surface plotting selected data
1 view (last 30 days)
Show older comments
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 Comments
Thomas Rosin
on 13 Apr 2019
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
on 13 Apr 2019
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.
Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!