I want to draw this surface on $\displaystyle [0,1]^3$:


$\displaystyle z=x$ for $\displaystyle x\geq y$ and $\displaystyle z=y$ for $\displaystyle y>x$

I know "meshgrid" coupled with "surface" command allows you to draw $\displaystyle z=x$ and $\displaystyle z=y$, respectively. But I have no idea how to account for the inequalities.

Thanks.