matlab 等待gui操作

pause(0.01);

 

 

 

if TM.isfirst==1
             uicontrol('Position',[20 20 200 40],'String','Continue',...
              'Callback',@callui);
                TM.isfirst=0;
            end

               pause(0.01); 

                
            TM.notify( 'DataChangedEvent' );

 


            function callui(source,callbackdata)
                if strcmp(source.String,'Continue')
                    source.String='Stop';
                    uiwait(gcf);
                   
                else
                     source.String='Continue';
                     uiresume(gcbf);
                end
            end

你可能感兴趣的:(matlab 等待gui操作)