how to set the negative values on a diagram to zero

5 ビュー (過去 30 日間)
Sehoon Chang
Sehoon Chang 2020 年 6 月 7 日
回答済み: Star Strider 2020 年 6 月 7 日
hello all,
could you kindly advise me how to set a limit on a diagram.
As you may see on the diagram that i have plotted, the orange graph tends to show negative value.
I wish to set a limit on the y-axis to zero, so that there are no more negative value appearing on the diagram.

回答 (1 件)

Star Strider
Star Strider 2020 年 6 月 7 日
One approach:
figure
plot( ... )
ylim([0, max(ylim)])
if you only want to limit the y-axis range.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by