MATLAB: Is fmesh preferred over mesh

surface plots

fmesh is much newer than mesh. Is it intended to replace mesh?

Best Answer

No. It supplements mesh. The fmesh function takes a function as one of its arguments, then creates the x- and y-matrices and plots the function as a function of those matrices.
It would be possible to do that with mesh with the function as the Z argument, but mesh takes matrices as its arguments.
See the documentation for both for details.