Environmental Engineering Reference
In-Depth Information
2.8
2.6
2.4
2.2
2
1.8
1.6
1.4
1.2
1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Fig. 1.6 MATLAB ® figure; first example
exp . This again is a vector. It is the strength of MATLAB
that functions are
defined on matrices. The result of the exponential operation is multiplied by c0 -
again by scalar multiplication - and stored in the vector f .
Finally, the plot command yields the graphical representation: the t vector is
used on the x -axis, and the vector f on the y -axis. The plot is depicted in a new
window on the display, the figure editor. More details of the figure editor are given
in the next Section.
In many cases the solution can not be expressed by an explicit formula like in
( 1.14 ). For that situation MATLAB
®
offers a command forthenumerical
solution, which is the approximate solution derived by a computational algo-
rithm. For ordinary differential equations there are several ode -commands, for
partial differential equations it is the pdepe -command. Both situations will be
explained in detail below. In addition, it is possible for the modeler to construct a
numerical solver oneself. For that more challenging strategy examples will be
given, too.
Usually the modeling is not complete with the second step. The third step of
modeling is the evaluation of the results, which one may also call post-processing.
Examples are simple calculations of derivative variables. In the given example one
may be interested in the growth rate at the 10 time periods between the time
instances, given by the vector f . This can simply be evaluated by using the diff
- command
®
Looking at the development of real species in the real world, the simple
expression ( 1.12 ) turns out to be too simplistic to describe the observed behavior.
 
Search WWH ::




Custom Search