surface plotting selected data

1 次查看(过去 30 天)
SAZZAD HOSSAIN
SAZZAD HOSSAIN 2019-4-13
Hello,
I have done a surface mapping. The data is now spread over a 10 by 10 matrix. However, In these 100 points I have data for only 33. How can I 3D-plot to show only these 33 points in the 10 by 10 surface. I tried making the rest of the points zero, but using mesh/surf produces weird planes and make the whole plot very confusing. Any help wiould be appreciated.
Thanks in advance.
  2 个评论
Thomas Rosin
Thomas Rosin 2019-4-13
Hi Sazzad,
I usually projection my 3d plot onto a 2D surface to visualize my data.
Try this code and tell me if you can see your data better?
temp=yourmatrix
figure
hold(axes('Parent',gcf),'on')
surf(1:10,1:10,temp)
shading(gca,'interp')
colorbar
colormap jet
pbaspect([1 1 1])
David Wilson
David Wilson 2019-4-13
You could try scatteredinterpolant (& friends for the plotting).
I assuming your 33 valid points are scattered within your 10*10 grid in a random manner. That means your valid data is not on a grid, so grid it first, then plot the gridded interpolant. You might also find griddata helpful.

请先登录,再进行评论。

回答(0 个)

类别

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