Blank faces in surface plot
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!