From: seoneo on
Hi,
I want to interpolate Z with these parameters:

grid:
X: (a×b×c)-size,
Y: (a×b×c)-size,

data:
Z: (a×b×c)-size,

where:
XI: (1×1×c)-size and
YI: (1×1×c)-size matrices.

the function:
RES = interp2(X,Y,Z,XI,YI);

where RES is a (1×1×c)-size vector.

How can I do it?
From: John D'Errico on
"seoneo " <seoneo(a)mpp.hu> wrote in message <hodl70$9or$1(a)fred.mathworks.com>...
> Hi,
> I want to interpolate Z with these parameters:
>
> grid:
> X: (a×b×c)-size,
> Y: (a×b×c)-size,
>
> data:
> Z: (a×b×c)-size,
>
> where:
> XI: (1×1×c)-size and
> YI: (1×1×c)-size matrices.
>
> the function:
> RES = interp2(X,Y,Z,XI,YI);
>
> where RES is a (1×1×c)-size vector.
>
> How can I do it?

Not by using interp2.

Use griddata.

John
From: seoneo on

> Not by using interp2.
>
> Use griddata.
>
> John

Hello John,
Thanks your answer. It works successful.

If I want to use different grid for each point, what can I do?
I tried to create cell array and 3D array but its didn't work well. If I use a bigger common 2D array, it works well, but the program is not really fast :S
If I use for-cycle, the problem is same.