9-4 三維??點內??

MATLAB interp3 ii 3 lIA@榡

vi = interp3(x, y, z, v, xi, yi, zi, method)

䤤 xByBzBv OTx}AeT̥NIJAv hOIXAxiByi zi hOIAr method hwPkA@ 4 ءG

ϥ interp3 ɡAx} xByBz OY滼WλC@뱡pUA xBy z O ndgrid O Ҳ͡AHOҨ榡TʡC

ϥ interp3 ҤlpUCAڭ̨ϥ flow OͤTתŶI]oǸƬObQgftפjp^AåHϡ]Slice^覡eXG

Example 1: 09-k/slice01.m[x, y, z, v] = flow(10); slice(x, y, z, v, [6 9.5], 2.5, [-2 0]); colorbar; % CPƭȪӪ size(x) ans = 10 20 10

ѤWi xByBz ׬O 102010CbWҤAslice OiTתŶAgC⪺PANiHϧOƭȪCAuCvPuƭȡvӪAiHѨϧΥk誺 colorbarC

Hint
  • bMATLAB`Ϊ1JƬO humpsA`ΨӴզusIάOȡC
  • `Ϊ2JƬO peaksA`ΨӴզϩάOuC
  • ӱ`ΪTJƴNO flowA`ΨӴդϩΤTC

ܩ㪺AѤWzdҪϧΡAiHPıƪѪRפӧCA]ϧΫܲWCFϹϧΧ󬰲ӽoAۧڭ̨ϥ meshgrid OͤTתŶlIAå interp3 Ӷi椺AdҦpUG

Example 2: 09-k/interp301.m[x, y, z, v] = flow(10); [xi, yi, zi] = meshgrid(.1:.25:10, -3:.25:3, -3:.25:3); vi = interp3(x, y, z, v, xi, yi, zi); slice(xi, yi, zi, vi, [6 9.5], 2.5, [-2 0]); % ͤ colorbar; % CPƭȪӪ size(xi) ans = 25 40 25

ѤWi xiByiBzi ׬O 254025AGnYK\hA]eXӪϧΤ]ӽoB[C

Hint
bWzdҪϧΤAYnܮuAiHJushading interpvAɩұo쪺CNOi@BgѤұo쥭ܤƪCAиոլݡC


MATLAB{]pGig