필터 지우기
필터 지우기

How to plot a object boundary using MATLAB if we have coordinates?

조회 수: 2 (최근 30일)
Arun Sharma
Arun Sharma 2016년 12월 8일
댓글: Arun Sharma 2016년 12월 9일
Hello! Everyone, I have Object placed inside a box and i used distance sensors to get the distance of the object from a reference point (0,0,0), now i want to plot the surface of this object using MATLAB, but i am confused, which plotting function to use.
Suppose the object placed is cylindrical object as shown below.
These are the valid points which i get from the sensor from point (0,0,0) and all of these points are same across the z-axis
x = (89.26772163,89.2251516,89.17737906,89.05573047, 88.8611554,88.59463961,88.2572044,87.84990611, 90.60990337,93.38333305,96.16835842,98.96312702, 101.7657715,104.5744107,107.4709263)
y = (86.20483673,83.20379993,80.29567276,77.41496542, 74.56336272,71.74252458,68.95408524,66.19965255, 65.83194826,65.38771374,64.8663768,64.26740613, 63.59031171,62.83464514,62.04836823)
Which plot should i use to get the one side boundary using MATLAB as follow:
With the points above, it is not possible to draw the complete image, but at-least it is possible to draw the boundary of the front side. Please suggest which type of plot, surface plot i can use.

답변 (1개)

KSSV
KSSV 2016년 12월 8일
  댓글 수: 5
Jiro Doke
Jiro Doke 2016년 12월 9일
I also get an L-shaped line. Try it.
x = [89.26772163,89.2251516,89.17737906,89.05573047, ...
88.8611554,88.59463961,88.2572044,87.84990611, ...
90.60990337,93.38333305,96.16835842,98.96312702, ...
101.7657715,104.5744107,107.4709263];
y = [86.20483673,83.20379993,80.29567276,77.41496542, ...
74.56336272,71.74252458,68.95408524,66.19965255, ...
65.83194826,65.38771374,64.8663768,64.26740613, ...
63.59031171,62.83464514,62.04836823];
plot(x,y)
Arun Sharma
Arun Sharma 2016년 12월 9일
I am also getting the L-shaped line, but i thought i will get some curve. I am confused why i am getting this L-shaped line. These points are curve of the cylinder, i should get some curve like thing. I think i am doing something wrong or missing something.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by