How to plot a surface in Matlab?
Show older comments
I would like to plot a surface in matlab; however, matlab is assigning each element of the matrix to an intersection of the meshgrid. I want each element of my matrix to be the value of each square in the meshgrid, not at the intersections. The result of this problem is that I am 'missing' a row/column on one end of my surface plot due to the color mapping. Using the data cursor I can confirm that the values are there, except on the intersections of the grid lines; hence the edges are effectively missing a row/column visually. I want a 3D equivalent of imagesc. Any ideas?

7 Comments
Massimo Zanetti
on 28 Sep 2016
A square has 4 vertex.. So you cannot assign one value to a square.
Cankut Eker
on 28 Sep 2016
KSSV
on 28 Sep 2016
How about assigning all four values same to each vertex?
Cankut Eker
on 28 Sep 2016
KSSV
on 28 Sep 2016
Have you tried shading interp after plotting the surface?
Cankut Eker
on 28 Sep 2016
Cankut Eker
on 28 Sep 2016
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!