Dear all, I have a set of experimental conditions obtained by sweeping 3 parameters A, B, C. For each condition, I have 1 experimental data. The experimental conditions are listed in an order associated with the cartesian product of list of 3 parameters A, B and C, said vector A(1..n), B(1..m), C(1..p). Threfore for any [A(i) B(j) C(k)], I have 1 experimental data located at the index ind=f(i,j,k) in the matrix of cartesian product of list of A,B and C.
With this index, I can get the experimental value M(index,1) for column 1 of my data, for example.
A = [1 2 3]; B = [10 20 30]; C=[100 200 300] ; R is the cartesian product of list of parameters A,B,C and has a length of mxnxp=27 (in this example). It must give this order of row lines of R as : 1 10 100 ; 1 10 200 ; 1 10 300 ; 1 20 100 ; etc... It is worth to notice that meshgrid(A,B,C) does not give row lines listed above but 1 10 100 ; 1 20 100 ; 1 30 100 ; 2 10 100 ; 2 20 100 ; 2 30 100 ; 3 10 100 ; ... this is not what I want.
The ascending index value of R should corresponds to the correct combination of parameters used in the order A then B then C. Therefore the corresponding 'index' of vector M(index,1) corresponds to the row line of R.
Here comes my hurdle for several weeks: I want to display data on 3D graph (using scatter3, plot3, or surf3). I need to define (X,Y,Z,Color).
X can be either A, B or C. Y can be either A, B, or C. Legend Color can be either A, B, or C. Z is the corresponding data located at the index of R. But I need to build up a 2D or 3D vector for Z.
Indeed plot3(A,B,Z,C) is the same than plot3(B,A,Z,C). In case of 3 parameters (A,B,C), the 3D graphs should be displayed as : plot3(A,B,Z,C) , plot3(A,C,Z,B), plot3(B,C,Z,A).
How to build up the matrix Z by picking up the correct index of R in order to display each 3D graphs?
(I am sorry, I spent a long time to synthetise my question, but it helped me to better define my problem. Still, I feel that for readers, it could be not enough clear. I am so sorry for that).
My final goal is to be able to solve this problem for N parameters (N=1 to 5). The data are recorded in a fixed order (A,B,C,...).
I will be more than happy to get any answer, at least before my head will explose ! Sincrely yours Laurent