1 2 3 4 5 6 7 8 9 10 11 12 13 14
| in1=[1:2];
a(:,:,1,1)=ones(2);
a(:,:,1,2)=2*ones(2);
a(:,:,2,1)=2*ones(2);
a(:,:,2,2)=4*ones(2);
testin=[10*rand(1,4)];
%interpn returns a numerical value if the method 'spline' is chosen and the
%point lies outside the range defined by the look-up table
extspl=interpn(in1,in1,in1,in1,a,...
testin(1),testin(2),testin(3),testin(4),'spline')
%interpn returns NaN if the method 'linear' is chosen and the
%point lies outside the range defined by the look-up table
extlin=interpn(in1,in1,in1,in1,a,...
testin(1),testin(2),testin(3),testin(4),'linear') |
Partager