how to set the negative values on a diagram to zero

4 Ansichten (letzte 30 Tage)
Sehoon Chang
Sehoon Chang am 7 Jun. 2020
Beantwortet: Star Strider am 7 Jun. 2020
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.

Antworten (1)

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

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by