Clear Filters
Clear Filters

surface plotting selected data

1 view (last 30 days)
SAZZAD HOSSAIN
SAZZAD HOSSAIN on 13 Apr 2019
Commented: David Wilson on 13 Apr 2019
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
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
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.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!