How to make output X Y graph like the picture?

2 ビュー (過去 30 日間)
Zaky Ghalib
Zaky Ghalib 2023 年 5 月 17 日
コメント済み: Mathieu NOE 2023 年 5 月 22 日
can you help me, How to make output X Y graph like the picture?

回答 (1 件)

Mathieu NOE
Mathieu NOE 2023 年 5 月 17 日
hello
you simply have to remember that vertical lines need you to duplicate the x value (with different y values of course)
like in this example x = 2 for both y = 1 and 2
x = [1 2 2 3];
y = [1 1 2 2];
plot(x,y,'linewidth',5);
xlim([0 4]);
ylim([0 3]);
  1 件のコメント
Mathieu NOE
Mathieu NOE 2023 年 5 月 22 日
hello
problem solved ?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by