get(x,y) coordinates from rectangle function in matlab
20 次查看(过去 30 天)
显示 更早的评论
Hi, I use rectangle function to draw a rectangle with two ends curved using following codes:
Rec = rectangle('Position',[1,1,10,5],'Curvature',1);
Will it be possible to get the (x,y) coordinate matrix of Rec?? Thanks for the help.
0 个评论
回答(2 个)
Walter Roberson
2012-7-18
What is "the (x,y) coordinate matrix" of Rec ?
You can get() the Position property of Rec to retrieve the [1,1,10,5]
4 个评论
Walter Roberson
2012-7-18
Sorry, I did not notice about that.
I do not know of any method to extract the coordinates. There might be one that is not obvious, but I cannot test that at this time.
Ana Gonçalves
2022-5-24
To get the coordinates, just follow the index of the array:
r = rectangle('Position',[20 -3 10 10]);
r.Position(1) % x value
r.Position(2) % y value
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!