Errant
Computer
- May 25, 2005
- 1
Hi,
I have the folliwng code in Matlab and I get the diagram below:
However, I need both x^2 + y^2 = 1 and z = x^2 be drawn in a mesh and the observer would tell them apart and would visualize the intersection as the picture above.
I hope you understand what I mean.
p = -3:0.1:3
x = sin(p);
y = cos(p);
z = x.^2;
plot3(x,y,z);
grid on;
Do you know how this code should be modified to give me what I need ?!
I have the folliwng code in Matlab and I get the diagram below:
However, I need both x^2 + y^2 = 1 and z = x^2 be drawn in a mesh and the observer would tell them apart and would visualize the intersection as the picture above.
I hope you understand what I mean.
p = -3:0.1:3
x = sin(p);
y = cos(p);
z = x.^2;
plot3(x,y,z);
grid on;
Do you know how this code should be modified to give me what I need ?!