update UIAxes when change values in a table in app Designer
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hi,
i have a UITable, UIAxes and a button. My program plots a wing giving some data from the table. I want to update the plot when i change the values in the table and press the button. I tried to set the UIAxes property: next plot---->replace children and replace all, but it doesn't work, the program add the new plot to the older. How can i delete the older plot? This is a piece of the code
function ButtonPushed(app, event)
%take data from the table
app.geo.c=str2double(app.UITable_wing.Data(1,6));
app.geo.dihed=str2double(app.UITable_wing.Data(1,9))*(pi/180);
app.geo.b=str2double(app.UITable_wing.Data(1,11));
app.g = ....
app.ref =....
%plot
geometryplot1(app.g,app.geo,app.ref,app.UIAxes)
end
how can i fix the problem?
Thank you!
4 comentarios
J. Alex Lee
el 1 de Abr. de 2021
can you just call "cla(axHandle)" inside your geometryplot1 function?
My choice would be to have a plot initializer if the "things" you plot is always the same, and in your plot updater just update the data associated with each plot handle.
Maybe an even better way with more modern matlab would be to use the custom charts mechanism
Respuestas (0)
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!