Blank faces in surface plot
显示 更早的评论
Hi,
I have non-uniformly spaced data and am using meshgrid, griddata & surf to obtain a surface plot. Since my data has discontinuities, I would like to have the plot show an empty face corresponding to those coordinates. Is there a way to do that? My current code is as below:
xlin = linspace(min(x),max(x),300);
ylin = linspace(min(y),max(y),150);
[X,Y] = meshgrid(xlin,ylin);
Z = griddata(x,y,z,X,Y,'cubic');
figure;
surf(X,Y,Z);
Discontinuities in my function values (z) are represented by NaN. For eg. at x = 1650, y = 150, z is set as NaN to represent a discontinuity.
Thanks!
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!