9-5 高維??點內??

ڭ̥iHϥ interpn OӶi氪lIAϥλykpUG

vi = interpn(x1, x2,.., v, y1, y2,.., method)

䤤 x1Bx2BK OIJAv OIXAy1By2BK OIAӦr method hiwkAUC 4 ءG

ϥ interpn ɡAx1Bx2BK OY滼WλCFOҮ榡TAx1Bx2BK ̦nO ndgrid O͡AHO榡TʡC

GlIi meshgrid O͡AӰlIhi ndgrid OҲ͡AϥλykpUG

[X1, X2, X3,K] = ndgrid(x1, x2, x3,K)

䤤 XI i O xi в͡C|ҨӻAڭ̥ipUC{

$$ z = x_2 e^{-x_1^2-x_2^2-x_3^2} $$

blIȡAåHCNȪjpAMAΧKIӶi椺AoӽoϡApUG

Example 1: 09-k/interpn01.mx1 = -2:0.4:2; x2 = -2:0.5:2; x3 = -2:0.3:2; [x1, x2, x3] = ndgrid(x1, x2, x3); z = x2.*exp(-x1.^2-x2.^2-x3.^2); subplot(2,1,1); slice(x2, x1, x3, z, [-1, 1], [], [0]); shading interp % RuAçΥƪC view(-20, 15); colorbar; % CPƭȪӪ y1 = -2:0.1:2; y2 = -2:0.1:2; y3 = -2:0.1:2; [y1, y2, y3] = ndgrid(y1, y2, y3); zz = interpn(x1, x2, x3, z, y1, y2, y3); subplot(2,1,2); slice(y2, y1, y3, zz, [-1, 1], [], [0]); shading interp % RuAçΥƪC view(-20, 15); colorbar; % CPƭȪӪ

bWzdҤAW誺ϤWAU誺ϫhӱKA interpn OĪGCt~AbWzdҤAڭ̨ϥ interpn Oӹ 3 ӿJIi椺A\OM interp3 ۦPAƹWA interpn OOiH󰪺תIi椺AҥHb\󬰱jjC


MATLAB{]pGig