That's what I came up with so far:
[x,y]=meshgrid(linspace(-1,1,100));
t=triu(ones(size(x)),-1)&ones(size(x));
z=x.^2+y.^2;
plot3(x(t),y(t),z(t),'o')
Is there any chance to really represent the function z as a surface?
Best Regards,
Peter
Use:
z(~t) = NaN;
surf(x, y, z);
instead of your PLOT call.
Actually, since I believe you can express your condition as a function of x
and y, you don't need to create t. An example that you can adjust to suit
your specific needs:
[x,y]=meshgrid(linspace(-1,1,100));
z=x.^2+y.^2;
z(x < y) = NaN;
surf(x, y, z)
--
Steve Lord
sl...@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ