I am trying to draw 3D plot from a 2D line graph (in x/z-axis).
I have discrete data points in x and z-axis like below graph. I want to roate it around z-axis. Therefore, I used 'surf'
Here is what I obtained so far.
filename = 'filename.xlsx';
r = (x(4:49,12))'; z = (x(4:49,13))';
for i = 1:46;
theta = linspace(0,2*pi,200);
X = r(i)*cos(theta);
Y = r(i)*sin(theta);
Z = z(i)*ones(length(Y), length(X));
if i < 46;
i = i+1;
and this is the result..
The profile has to be very smooth, no sharp edges on the boundary. However, it has four edges. Also, when x<450, there is be no data points in z-axis.. but it shows very flat top surface (yellow). I think I need to assign z-values at the correct x and y coordinates. However, I am not sure how to fix this.
Please help me to resolve this issue.
Thanks a lot for your comments and time in advance!