fmesh is much newer than mesh. Is it intended to replace mesh?
Best Answer
No. It supplementsmesh. Thefmesh function takes afunction as one of its arguments, then creates thex- andy-matrices and plots the function as a function of those matrices.
It would bepossible to do that withmesh with the function as theZ argument, butmesh takes matrices as its arguments.
There is a general description of the matrix format along with two examples.
If you are defining boundary conditions in a MATLAB script, my own preference (and recommendation) is to write a "boundary file" (user-written MATLAB function) to define your boundary conditions instead of trying to create a boundary matrix. I find writing a boundary condition function to be much more straightforward than writing a boundary matrix. The approach is documented here:
Best Answer