www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/TwoDimensionalInterpolationExample.m
%% 2-D Interpolation % Copyright 2015 The MathWorks, Inc. %% % Create a set of grid points and corresponding sample values. [X1,X2] = ndgrid((-5:1:5)); R = sqrt(X1.^2 + X2.^2)+ eps; V = sin(R)./(R); %% % Interpolate over a finer grid using |ntimes=1|. Vq = interpn(V,'cubic'); mesh(Vq);