Problem: Plot the function
Using MATLAB we must define the range of
and
, then use the function
meshgrid() to create the
grid, then evaluate
using the above
equation, then use the function surf() to plot it. There are other functions
to do 3d plots in MATLAB as well.
In Mathematica, define the function first and then use the Plot3D function.
Observations: In Matlab we have to manually define the range of x and y and the spacing between the points. Then use meshgrid to generate the xy points. In Mathematica, this is not needed, and is automatically handled. On the other hand, Matlab plots can be much easier analyzed. One can use the mouse to rotate the plot and zoom in and out and change many other aspects of the plot without having to reissue the plot command again and again as the case would be with Mathematica. So basically one needs to a little more work to generate the plots in Matlab than in Mathematica, but one the plot is generated, it is much easier and more powerful to analyze them on the screen using Matlab. This has always been something that Matlab was best at.
Nasser M. Abbasi