Can't plot multiple figures in one axes in app designer

1 Ansicht (letzte 30 Tage)
ZC Song
ZC Song am 14 Apr. 2019
Kommentiert: ZC Song am 15 Apr. 2019
Hi I now struggling in how to plot multiple figures in one axes, below is my code:
function PlotButtonPushed(app, event)
for j = 1:(10)
plot(app.UIAxes,app.RESULTS.profiles_hw(:,j),(app.FE_data.Z),'LineWidth',1)
hold(app.UIAxes,on)
end
end
in which, 'RESULTS' is a matrix contains 10 arraies.
How can I achieve this? My version is Matlab R2019a
Thank you very much!

Akzeptierte Antwort

Cris LaPierre
Cris LaPierre am 15 Apr. 2019
When you push the plot button, what error message are you getting? I suspect it says "Undefined function or variable 'on'."
Try changing your hold command to this:
hold(app.UIAxes,'on')

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Object Programming 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!

Translated by