필터 지우기
필터 지우기

Plotting multiple graphs in one plot.

조회 수: 5 (최근 30일)
anton fernando
anton fernando 2014년 10월 10일
편집: Stephen23 2014년 10월 14일
I have a plot of the change of the temperature variations from 2014-2013 for different altitudes. let's say I have it for 10 different altitudes. How do I plot them in the same graph. In the pdf I have attached you will see 2 figures. I want to construct the plot in the figure 1 from similar plots like in the figure 2. How would I do that.

채택된 답변

Orion
Orion 2014년 10월 13일
Hi,
it seems that you just want to do some subplots :
t = 0:0.01:10;
a1 = cos(t);
a2 = sin(t);
figure;
subplot(2,1,1) % first plot
plot(t,a1)
subplot(2,1,2) % second plot
plot(t,a2)
so each data is plotted in a separated axe.
  댓글 수: 2
anton fernando
anton fernando 2014년 10월 13일
what does
subplot(2,1,1)
means?
Stephen23
Stephen23 2014년 10월 14일
편집: Stephen23 2014년 10월 14일

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Mischa Kim
Mischa Kim 2014년 10월 10일
Hello anton, there is no attachment. But if you can plot one curve, you can do several as well:
t = 0:0.1:1;
a1 = rand(size(t));
a2 = 2*rand(size(t));
a3 = 3*rand(size(t));
alt = [a1; a2; a3];
plot(t,alt)
  댓글 수: 1
anton fernando
anton fernando 2014년 10월 10일
I attached the pdf. Please take a look at it.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by