No BSD License  

Highlights from
aide mémoire Matlab (seconde édition)

from aide mémoire Matlab (seconde édition) by Jean-Thierry
les m-fichiers de l'aide mémore Matlab seconde édition

ex_griddata.m
f = inline('exp(-x.*x -y.*y)','x','y');
x1 = linspace(-1,1,30);
y1 = x1;
[x0, y0] = meshgrid(x1,y1);
subplot(1,3,1);
mesh(x0,y0,f(x0,y0)); 
title('surface originale','fonts',14)
x = 2*rand(1,200)-1; y = 2*rand(1,200)-1;
z = f(x,y);
[xx, yy, zz]=griddata(x,y,z,x1(:)',y1(:));
subplot(1,3,2);
plot3(x,y,z,'r+')
title('points pars', 'fonts',14)
subplot(1,3,3);
mesh(xx, yy, zz); hold on %shading('interp');
plot3(x,y,z,'r+')
title('surface reconstitue','fonts',14)

Contact us at files@mathworks.com