|
Hi everybody, let me explain the problem...
I've got some x,y,z,v data calculated on a regular grid (in order to
use interp3)
Assume that this data are as the following
X = [0 1];
Y = [1:10];
Z = [5 6];
X,Y,Z describe the coordinates in the (x,y,z) space in which we have
computed the value of the fourth variable V.
So we can obtain the grid for interp3 with [XI, YI, ZI] = ndgrid
(X,Y,Z).
Now the problem is to build the 3D array V needed for interp3
function, because I want to use the function in the form interp3
(X,Y,Z,V,XI,YI,ZI).
In fact the values of V are given as following:
x(1) y(1) z(1) V_value_1;
x(1) y(2) z(1) V_value_2;
...
x(1) y(1) z(2) V_value_k;
x(1) y(2) z(2) V_value_k1;
...
x(2) y(1) z(1) V_value_w;
x(2) y(2) z(1) V_value_w1;
...
x(2) y(1) z(2) V_value_ww;
x(2) y(2) z(2) V_value_ww2;
...
How can I quick build the 3D array of V values ?
thanks for responses,
LT
|