Surf function with interp: symmetric surface shown assymmetrically
Show older comments
Hello All,
I have a surface Z formed by the following commands (very simplified version) and it is symmetric in XY plane (looking from the top or bottom). However when I use the "surf" command with 'interp', I get a slightly assymetric surface.
clc
clear all
Z=[0 0.1 0.3 0.1 0;
0 0.2198 0.4432532 0.2198 0;
0 0.4242 0.7898989 0.4242 0;
0 0.2198 0.4432532 0.2198 0;
0 0.1 0.3 0.1 0];
[X,Y] = meshgrid(0:1.5:6,0:1.5:6);
surf(X, Y, Z, 'LineStyle', '-', 'FaceColor', 'interp')
daspect([1,1,0.2])
colormap(jet)
colorbar
When I use decimal numbers instead of the Z values above though, I do not get such a problem.
Any ideas how to obtain the symmetric surface at XY plane?
Cheers.
2 Comments
Stephen23
on 17 Nov 2018
Bruno Luong
on 17 Nov 2018
IMO Parula does not releal defect as clear as JET (which I still prefer in general)

Accepted Answer
More Answers (1)
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!
