Filter löschen
Filter löschen

Plotting straight line on graph

18 Ansichten (letzte 30 Tage)
Zane  Wilkinson
Zane Wilkinson am 5 Aug. 2015
Beantwortet: Vedangi Gholap am 16 Okt. 2023
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
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
plot([first_x last_x], 40)
  2 Kommentare
Simon
Simon am 15 Okt. 2023
this does not work
Matt J
Matt J am 15 Okt. 2023
plot([first_x last_x], [40,40])

Melden Sie sich an, um zu kommentieren.


Vedangi  Gholap
Vedangi Gholap am 16 Okt. 2023
plot([0 3], [40,40])

Community Treasure Hunt

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

Start Hunting!

Translated by