I want to plot a straight line using App designer.I am using it for the first time and here is a code snippet.But no graph appears.Can someone please help?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
VAGEESH ANAND DAMBAL
el 28 de Nov. de 2017
Respondida: Elizabeth Reese
el 30 de Nov. de 2017
selectedButton = app.DistributionButtonGroup.SelectedObject; x=1:1:2000; y=x; if strcmp(selectedButton,'U')%I have 3 buttons U,E and N plot(app.UIAxes,x,y); end
0 comentarios
Respuestas (1)
Elizabeth Reese
el 30 de Nov. de 2017
If you want to do the plotting when the user selects the button labeled 'U', then you should be comparing the 'selectedButton.Text' field. The SelectedObject returns the whole UI object for the button that was chosen, so you can extract the field 'Text' to get the string that appears on the button. Hope this helps and have fun with App Designer!
0 comentarios
Ver también
Categorías
Más información sobre Develop Apps Using App Designer 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!