Hello,
I have a problem relating to 3d representation using mesh commands
I have 3 matrices X, Y and Z
All matrices have the same number of entries and they are row vectors, i.e. 1 by m
All the data are real values measured experimentally.
I want to plot these matrices in three dimension plot as a plane or surface to
see the impact of X and Y on Z using mesh commands.
I wrote the following code:
% every matrix contains, for example, 10 elements
X=rand(1,10);
Y=rand(1,10);
Z=rand(1,10);
[XX,YY]=meshgrid(X,Y);
I know that ZZ must be m by m matrix, so in this example ZZ must be
10 by 10 matrix but how can we enforce it to be 10 by 10 matrix ?
In all the examples I have seen, ZZ is a function of XX and YY and is directly
found from a formula. But in my case, Z is a matrix containing elements and its size
is the same as X and Y which are 1 by 10. Also, in my case Z is a function of X and Y
but this function is not known. I think one solution is to find a formula Z = f ( X , Y )
and then proceed as this example:
X=rand(1,10);
Y=rand(1,10);
Z=rand(1,10);
[XX,YY]=meshgrid(X,Y);
ZZ = X .* exp(XX.^2  YY.^2);
mesh(XX,YY,ZZ)
but it is difficult to find Z = f ( X , Y ) since I have huge data and it is difficult
to make curve fit or least square method to find such formula.
Could you please help me in this problem.
Regards
