Is there an example available for the GRIDDATA3 function in MATLAB 7.0.1 (R14SP1) documentation?

2 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This enhancement has been incorporated in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
As an example, assume we have scattered points in 3-space "(x, y, z)", and their corresponding function value "v = v(x,y,z)". Some sample data can be created using:
x = rand(5,5);
y = rand(5,5);
z = rand(5,5);
v = rand(5,5);
plot3(x,y,z,'.')
Here you can interpolate the function "v" at a set of gridded data points using GRIDDATA3. For example,
[X Y Z] = meshgrid(0:.1:1); % Create gridded data
v = griddata3(x,y,z,v,X,Y,Z); % Interpolate v at the gridded data points.
Now you have the function value at the gridded data points, i.e. "v = % v(X,Y,Z)".

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Products


Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!