Error by using xline function
21 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I ran into a problem by using the xline function.
My aim was to draw a vertical line for x=5 and planned to use the xline function but I got "Undefined function".
I find this strange as the function is on the help suggestions.
Can somebody help me with this issues?
Thankks to all who can help me.
Chiara
0 个评论
采纳的回答
Star Strider
2020-11-7
The xline function was introduced in R2018b.
Try this:
figure
plot((0:8), rand(1,9))
hold on
plot([1 1]*5, ylim, '-r') % Draw A Red Vertical Line At ‘x=5’
hold off
.
4 个评论
Star Strider
2021-3-9
Rasmus Johs Nielsen — Probably. It depends on what you want to do, and where you want to place the text.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!