Effacer les filtres
Effacer les filtres

Plotting straight line on graph

18 vues (au cours des 30 derniers jours)
Zane  Wilkinson
Zane Wilkinson le 5 Août 2015
Hey easy question but how do i plot the line y=40 in matlab? What is the script i need to write?
Thanks zane :)

Réponse acceptée

Simon
Simon le 15 Oct 2023
Déplacé(e) : Matt J le 15 Oct 2023
yline(40)
  1 commentaire
Dyuman Joshi
Dyuman Joshi le 15 Oct 2023
Note that yline is available from R2018b onwards.
In case of an older version, use the method described in the other answer.

Connectez-vous pour commenter.

Plus de réponses (2)

Walter Roberson
Walter Roberson le 5 Août 2015
plot([first_x last_x], 40)
  2 commentaires
Simon
Simon le 15 Oct 2023
this does not work
Matt J
Matt J le 15 Oct 2023
plot([first_x last_x], [40,40])

Connectez-vous pour commenter.


Vedangi  Gholap
Vedangi Gholap le 16 Oct 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