How to plot a 3D plot from three linear vectors?
조회 수: 3(최근 30일)
I have three vectors x ,y and z. The size of all of them are same.But all of them are 1D arrays. I want to draw a 3D plot from them. Let me give it in code form as below:
x=linspace(0,180,100);% 1st vector
y=x;% 2nd vector
z=rand(1,100)*1e-7;% 3rd vector
I tried to convert both x and y to 2D vectors as below:
But when I use the surface command or mesh command, it gives me error as:
Z must be a matrix, not a scalar or vector.
What to do?