필터 지우기
필터 지우기

how to create this type of plot having two signals on one axis?

조회 수: 1 (최근 30일)
ASIF ALI
ASIF ALI 2023년 4월 11일
편집: Cris LaPierre 2023년 4월 12일

채택된 답변

Cris LaPierre
Cris LaPierre 2023년 4월 12일
Just use plot with hold on. It looks like your X values determine how they align.
x1=1:5;
y1 = 5:-1:1;
x2=5:9;
y2 = 1:5;
plot(x1,y1,'g')
hold on
plot(x2,y2,'r')
hold off
  댓글 수: 4
ASIF ALI
ASIF ALI 2023년 4월 12일
for workspace , should i import signal data as array or dataset?
Cris LaPierre
Cris LaPierre 2023년 4월 12일
편집: Cris LaPierre 2023년 4월 12일
"The dataset data type is not recommended. To work with heterogeneous data, use the MATLAB® table data type instead. See MATLAB table documentation for more information."
I would add that, if your data is all the same data type, then use an array (readmatrix instead of readtable)

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by