Plotting different variable sets on same graph

조회 수: 1 (최근 30일)
notalwayssure
notalwayssure 2022년 1월 20일
댓글: notalwayssure 2022년 1월 20일
I have two sets of data; Current1 (x), Power1 (y) & Current2 (x), Power2 (y). Matlab will only plot the first set of variables and not the second set. I believe it has something to do with two different x axis. How do I combine these two into one plot? I want to compare the trends since it is the same type of data in each set.
plot(Current1, Power1,'r')
plot(Current2, Power2,'b')
  댓글 수: 1
Ankit
Ankit 2022년 1월 20일
Retain current plot when adding new plots
plot(Current1, Power1,'r');hold on
plot(Current2, Power2,'b');

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

채택된 답변

Voss
Voss 2022년 1월 20일
plot(Current1, Power1,'r')
hold on
plot(Current2, Power2,'b')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by