I have 3 vectors , one for angles of Phi , another for angles of Teta , and the last one a vector of points in the Y axe ,after computing the points of Teta & Phi with a function :
for teta = 0 : 10^-2 : pi/2
for phi = 0 : 10^-2 : pi/2
Y(current) = v*sin(phi)*sin(teta);
Teta(current) = teta;
Phi(current) = phi;
current = current + 1;
end
end
How can I plot the three of them together ?
I want to plot a 3d graph with Teta & Phi as a function of Y .
I’ve tried with plot3 but the result wasn’t so satisfactory .
Thanks
I’m unclear about the exact goals, but here’s my interpretation:
Create vectors of
tetaandphivalues, usemeshgridto produce a matrix of t and p values, and use the vectorized form ofsin(rather than aforloop). Then usesurfto plot the results as a surface in 3D.