multiple actions following @(src,event) in uicontrol
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    feynman feynman
 el 10 de Mzo. de 2024
  
    
    
    
    
    Comentada: Voss
      
      
 el 10 de Mzo. de 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 comentarios
Respuesta aceptada
  Voss
      
      
 el 10 de Mzo. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Adding custom doc en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!