uialert - make wait

From https://www.mathworks.com/matlabcentral/answers/463287-using-uialert-with-uiwait-and-uiresume

uialert(app.figure1,sprintf(['No serial port found (or mutiple ports). \n',... 'Check the USB Serial Port cable and matching COM number.\n',... 'Set COM number in Settings tab.\n',... 'Expect a USB-to-serial port cable to allow markers to be sent to fNIRS']),... 'No Serial Port','Icon','error','Modal',true,'CloseFcn','uiresume(gcbf)') uiwait(gcbf)

 

Â