multiple actions following @(src,event) in uicontrol
    4 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    feynman feynman
 am 10 Mär. 2024
  
    
    
    
    
    Kommentiert: Voss
      
      
 am 10 Mär. 2024
            How to add another action or function to the following
Button=uicontrol('Style','pushbutton', 'String','pause','Position',[1800 60 100 100], 'Callback',@(src,event)continue);
so that it becomes sth like
Button=uicontrol('Style','pushbutton', 'String','pause','Position',[1800 60 100 100], 'Callback',@(src,event){continue,close});
0 Kommentare
Akzeptierte Antwort
  Voss
      
      
 am 10 Mär. 2024
        Define a function that has whatever code in it you want.
Then make that function the button's callback:
Button=uicontrol('Style','pushbutton', 'String','pause','Position',[1800 60 100 100], 'Callback',@(src,event)your_function);
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Adding custom doc finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

