Plotting straight line on graph

18 次查看(过去 30 天)
Hey easy question but how do i plot the line y=40 in matlab? What is the script i need to write?
Thanks zane :)

采纳的回答

Simon
Simon 2023-10-15
移动:Matt J 2023-10-15
yline(40)
  1 个评论
Dyuman Joshi
Dyuman Joshi 2023-10-15
Note that yline is available from R2018b onwards.
In case of an older version, use the method described in the other answer.

请先登录,再进行评论。

更多回答(2 个)

Walter Roberson
Walter Roberson 2015-8-5
plot([first_x last_x], 40)

Vedangi  Gholap
Vedangi Gholap 2023-10-16
plot([0 3], [40,40])

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by