Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to draw a mesh !?

Status
Not open for further replies.

Errant

Computer
Joined
May 25, 2005
Messages
1
Location
CA
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 ?!
 
Have a look at contour, and the associated mesh commands, in the help. I haven't got to grips with them myself, yet.



Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top