how can i remove a part from stairs graph ?

2 ビュー (過去 30 日間)
ADNAN KIRAL
ADNAN KIRAL 2020 年 11 月 17 日
コメント済み: ADNAN KIRAL 2020 年 11 月 17 日
Hi,
I want to remove a part from the plot . How can i do that ?
or can i have such shape without drawn part ? any command from matlab ?
thanks in advance
this is the script
a=[0;1; 2; 3];
b=[0; 2.7;5.2;4.5];
figure
stairs(b, a, 'LineWidth',2)
grid on

採用された回答

Setsuna Yuuki.
Setsuna Yuuki. 2020 年 11 月 17 日
編集済み: Setsuna Yuuki. 2020 年 11 月 17 日
With the xlim() and ylim() command you can see from 2.7 to 6
a=[0;1; 2; 3];
b=[0;2.7;5.2;4.5];
figure
stairs(b, a, 'LineWidth',2)
xlim([2.7 6])
ylim([0 3])
grid on
  3 件のコメント
Setsuna Yuuki.
Setsuna Yuuki. 2020 年 11 月 17 日
編集済み: Setsuna Yuuki. 2020 年 11 月 17 日
if you change this:
a=[0;1; 2; 3];
b=[2.7;2.7;5.2;4.5]; %firt number 0-->2.7
figure
stairs(b, a, 'LineWidth',2)
grid on
ADNAN KIRAL
ADNAN KIRAL 2020 年 11 月 17 日
many thanks.

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by