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

2 ビュー (過去 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 Center および File ExchangeTables についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by