Azzera filtri
Azzera filtri

Plotting straight line on graph

18 visualizzazioni (ultimi 30 giorni)
Zane  Wilkinson
Zane Wilkinson il 5 Ago 2015
Risposto: Vedangi Gholap il 16 Ott 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 :)

Risposta accettata

Simon
Simon il 15 Ott 2023
Spostato: Matt J il 15 Ott 2023
yline(40)
  1 Commento
Dyuman Joshi
Dyuman Joshi il 15 Ott 2023
Note that yline is available from R2018b onwards.
In case of an older version, use the method described in the other answer.

Accedi per commentare.

Più risposte (2)

Walter Roberson
Walter Roberson il 5 Ago 2015
plot([first_x last_x], 40)
  2 Commenti
Simon
Simon il 15 Ott 2023
this does not work
Matt J
Matt J il 15 Ott 2023
plot([first_x last_x], [40,40])

Accedi per commentare.


Vedangi  Gholap
Vedangi Gholap il 16 Ott 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