How to plot data from different files in same plot/figure

I have different matlab files running in the same script, and I want to plot data from these different files in the same plot. Currently, I am using if´s and elseif´s but this is giving me a plot per data file. How can I plot all these in the same plot/figure?
if k==1
plot(ENGINE_SPEED.time,RPM)
elseif k==2
plot(ENGINE_SPEED.time,RPM)
elseif k==3
plot(ENGINE_SPEED.time,RPM)
end
Thanks.

답변 (1개)

Adam
Adam 2016년 11월 25일
doc plot
The first argument to plot can be an axes handle. Always use this
e.g.
hFig = figure; hAxes = axes( hFig );
plot( hAxes,...)

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

질문:

2016년 11월 25일

답변:

2016년 11월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by