I have two variables say X
,Y
. X,Y
are each5*1
matrices.
Each row represent a particular person and X
and Y
are two variables that represent two characteristics.
I have combined the effect of X,Y
through certain operations to form Z
so Z is also a 5*1 matrix.
Now I want to plot X,Y,Z
. That is I want to plot (X1,Y1,Z1),(X2,Y2,Z2),...(X5,Y5,Z5)
This is what I did.
[x,y]=meshgrid(X,Y)
z=diag(Z)
surf(x,y,z)
I want to know does this plot points such as (X1,Y2,Z2),(X1,Y3,Z2)(X2,Y1,Z3).
Because I don't want to plot these as I want to plot each individual person and not combining people.