Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

plot x=y=z 1

Status
Not open for further replies.

PaulaSilva72

Electrical
Mar 7, 2011
4
PT
I am a beginner in Matlab and I'm trying to plot 3 planes, defined by x=y=z using ezsurf.
z=x and z=y are easy, but I cannot find a way to plot the 3th plane x=y.

Thanking in advance...


%x=y=z

func1=@(x,y)x;
func2=@(x,y)y;
%??func3=@(x,z)y;

ezsurf(func1, [-1 1 -1 1]);
hold on
ezsurf(func2, [-1 1 -1 1]);
%??ezsurf(func3, [-1 1 -1 1]);
 
Replies continue below

Recommended for you

x=y=z is a point defined by the intersection of three planes: z=x (func1), z=y (func2)and x=y. The question is how to plot the plane x=y in a three dimensional system.
 
It doesn't answer your question, but Greg is right. x=y=z is not a plane nor is it a point. As you correctly stated in your OP, it is the union of 3 planes, x=y, y=z and x=z.

Anyway, enough pedantic point scoring.

ezsurf(fun) plots z=fun(x,y), so you can't use it to plot an implicit function of z. To plot implicitly, use the parametric form. The parametric form of x=y is {x=s; y=s; z=t}.

>> x = @(s,t) s;
>> y = @(s,t) s;
>> z = @(s,t) t;
>> ezsurf(x, y, z)

I've never used ezsurf before, so I had to google it. Seems to give you what you want when I try it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top