How to create a surface plot having 3 vectors?
I have 3 vectors X, Y, Z and each vector is 1×200.
I need to show the relationship between them on a plot. I used "plot3" which works, but it doesn’t show the relationship that well.
So, I was wondering if there is a way to create a surface plot. I tried to do:
surf(X,Y,Z) but it does not work and Matlab wants Z to be a matrix where Z depends on X and Y which is not the case in my calculations.
So, is there a way to get a surface plot with X, Y, and Z?
P.S.: I looked at other questions like this, but I am still confused how their answers can be applied to my case.I have 3 vectors X, Y, Z and each vector is 1×200.
I need to show the relationship between them on a plot. I used "plot3" which works, but it doesn’t show the relationship that well.
So, I was wondering if there is a way to create a surface plot. I tried to do:
surf(X,Y,Z) but it does not work and Matlab wants Z to be a matrix where Z depends on X and Y which is not the case in my calculations.
So, is there a way to get a surface plot with X, Y, and Z?
P.S.: I looked at other questions like this, but I am still confused how their answers can be applied to my case. I have 3 vectors X, Y, Z and each vector is 1×200.
I need to show the relationship between them on a plot. I used "plot3" which works, but it doesn’t show the relationship that well.
So, I was wondering if there is a way to create a surface plot. I tried to do:
surf(X,Y,Z) but it does not work and Matlab wants Z to be a matrix where Z depends on X and Y which is not the case in my calculations.
So, is there a way to get a surface plot with X, Y, and Z?
P.S.: I looked at other questions like this, but I am still confused how their answers can be applied to my case. surface, plotting, 3d plots MATLAB Answers — New Questions