필터 지우기
필터 지우기

Is it possible to add plots to an already existing graph?

조회 수: 2 (최근 30일)
Tom
Tom 2012년 3월 19일
I've got a script that is based around three different types of excitation, and rather than trying to use a load of tricky programming (which I don't know how to do), I was wondering if it's possible to just run it once with the first excitation type, then run it again, with the second and then again with the third, and each time the new lines would get added to the previous graph.
This seem unlikely, but I thought I may as well just check anyway.
  댓글 수: 1
Matt Fig
Matt Fig 2012년 11월 2일
Tom's question
I've got a script that is based around three different types of excitation, and rather than trying to use a load of tricky programming (which I don't know how to do), I was wondering if it's possible to just run it once with the first excitation type, then run it again, with the second and then again with the third, and each time the new lines would get added to the previous graph.
This seem unlikely, but I thought I may as well just check anyway.

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

채택된 답변

Wayne King
Wayne King 2012년 3월 19일
If you use hold on, you should be able to do that.
plot(randn(100,1));
hold on;
plot(randn(100,1),'r');
plot(randn(100,1),'k-^');
Or you can store your results in a matrix and plot that.
X = randn(100,3); % three runs store each run as a column
plot(X)

추가 답변 (0개)

카테고리

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