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

0 votes

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
plot([first_x last_x], [40,40])

Connectez-vous pour commenter.

Catégories

En savoir plus sur Line Plots dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by