Trouble with interpolation and gridding data points

suppose i have plane which is a subset of and i consider certain intervals on and i want to grid this in both , with some step size say and interpolate for all using the grid points, and i have a known function, where values of and are known.
The interpolation i want to use is and find the error
How would i grid the x1-x2 plane ? and how to use the interpolation formula there ? Any help ?

Answers (1)

Write a (vectorized) function for M(x1,x2), compute the interpolating grid [X,Y] with meshgrid and then call the function with [X,Y]
Not clear to me, however, where x2 enters into M, though, altho the text is so small I can't really read it.

4 Comments

Hey thanks for the answer. Could you expand your answer a bit more, how do i write the vectorized function and meshgrid, i'm new to matlab. Which part you're having trouble to read ?
D1 = -100;
D2 = 100;
X = D1 : 0.01 : D2;
Y = D1 : 0.01 : D2;
[x1, x2] = meshgrid(X, Y);
phi = k1*x1 + k2*x2;
imshow(phi, []);
Note, there are far too many points to see on your screen without zooming way in, but you can look at phi in the workspace variable inspector if you want.
Thanks for the reply, how do find ? this will take two inputs right, both x1 and x2 , in the above formula for argument of phi is a vector and , then may be i'll have
, How do i write this vector sum and use the interpolation ?
@Image Analyst @dpb any idea on the interpolation and the sum, how do i proceed with this ?

Sign in to comment.

Categories

Find more on Interpolation in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!