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


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

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

Thanks.