If I have data z = f(x,y) which have at some (or all) (x,y) coordinates more than a value for z. How can I represent the corresponding z value for the X and Y mesh grid, where [X Y] = meshgrid(x,y). I also wonder how this is handled in sphere function. For example: >> [x y z] = sphere(50) , surf(x,y,z) Since x,y,z meshgrids are not in the normal format of mesh grids?
MATLAB: Meshgrid multi-valued function data
multi-valued meshgridsphere
Best Answer