Hey easy question but how do i plot the line y=40 in matlab? What is the script i need to write?
Thanks zane :)

 Akzeptierte Antwort

Simon
Simon am 15 Okt. 2023
Verschoben: Matt J am 15 Okt. 2023

0 Stimmen

yline(40)

1 Kommentar

Dyuman Joshi
Dyuman Joshi am 15 Okt. 2023
Note that yline is available from R2018b onwards.
In case of an older version, use the method described in the other answer.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (2)

Walter Roberson
Walter Roberson am 5 Aug. 2015

1 Stimme

plot([first_x last_x], 40)

2 Kommentare

Simon
Simon am 15 Okt. 2023
this does not work
plot([first_x last_x], [40,40])

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Line Plots finden Sie in Hilfe-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