The loop construct allows us to build a function on a numerical grid. This use of the loop in in the spirit of our previous use of Excel whereby we calculated a function on an equally spaced numerical grid and plotted it. Here we use Maple as a "computing language" much as we were to use FORTRAN, C, C++, or any other high level language. In fact, even the syntax for the loop in Maple is reminiscent of these other languages.
The steps are:
The following worksheet defines and calculates the numerical grid.
The following calculates and plots the function on the grid.
The graph shows the Skewed-Mexican-Hat function.
Note that the notation xx[k] and yy[k] is used to store the values of x and of the function y = f(x) on the grid respectively.
Section 7.4
Chapter 7
Section 7.6
TOC
Any questions or suggestions should be directed to |