draw lines based on coordinates
22 次查看(过去 30 天)
显示 更早的评论
Hi,
I am looking for a way to add a line to a convex function based on the coordinates.
I have a convex funtion going from x=1, y=19.99 to x=17, y=18.57. How is it possible to draw a straigt line between those two coordinates?
Thank you very much for the help!
0 个评论
采纳的回答
Siam
2014-11-17
You can try this to draw the line
x = [1 17];
y= [19.99 18.57];
line(x,y,'Color','r','LineWidth',4)
You can change the color as 'r' is for red and line width as well which is 4 for this case.
4 个评论
Siam
2014-11-17
Please open a new question and provide some more information with a demo image if possible.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computational Geometry 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!