9-3 二維???點內??

Y˸ƨëDGblIWAhڭ̴NLkϥ interp2 OӶiGƪC󦹺شGơ]Scatter Data^Aڭ̥iϥ griddata OA榡pUG

zi = griddata(x, y, z, xi, yi)

䤤 xByBz OGIyСAxiByi hODȪI]q`OlI^CҦpG

Example 1: 09-k/griddata01.mx = 6*rand(100, 1)-3; % [-3, 3] 100 ӧäGü y = 6*rand(100, 1)-3; % [-3, 3] 100 ӧäGü z = peaks(x, y); [xi, yi] = meshgrid(-3:0.2:3, -3:0.2:3); zi = griddata(x, y, z, xi, yi); mesh(xi, yi, zi); % eX hold on; plot3(x, y, z, 'o'); hold off % eXI axis tight; hidden off; figure; mesh(xi, yi, zi); view(2); axis image % hold on; plot3(x, y, z+1, 'o'); hold off % eXI k = convhull(x, y); line(x(k), y(k), 10*ones(1,length(k)), 'color', 'r'); % Add convex hull

bWzdҤAڭ̱ĥΤF 100 ӨIAèϥ griddata OӶiGA@oӹϡ]ѩo 100 IOH͡AC泣@ˡAҥHo쪺ϧΤ]|C@ˡ^G

Ѧ]iHݥXAbi griddata ɡAoǴGInVhVn]pɶ]|HԪ^AӥBƪG]OnVVnA~GӥT peaks C

TGIAiHϥ griddata3 OA󰪺תAhiHϥ griddatan OAΪkM griddata AŪ̥iѽuW䴩AbAحzC


MATLAB{]pGig