PDF-Version - am Institut für Baustatik
PDF-Version - am Institut für Baustatik
PDF-Version - am Institut für Baustatik
Erfolgreiche ePaper selbst erstellen
Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.
4^ or ** for exponentiation (2^3 evaluates to 8)<br />
5abs(...) for absolute value (abs(-4) evaluates to 4)<br />
6! for factorial (3! evaluates to 6)<br />
One useful aspect of Maple is that it distinguishes rational values from floating-point (pseudo-real)<br />
values. Compare these statements:<br />
> 2/3;<br />
> 2.0/3.0;<br />
2/3<br />
.6666666667<br />
This gives you the flexibility to choose between approximate or exact answers to many mathematical<br />
questions.<br />
11.2.4 Variables and Equations (Variablen und Gleichungen)<br />
Maple variables are n<strong>am</strong>es that generally begin with a letter and are followed by up to 498<br />
alphanumeric or underscore characters; case is significant (eg: x is different from X in Maple). Maple<br />
distinguishes between two kinds of variables. A Maple progr<strong>am</strong>ming variable (Progr<strong>am</strong>mvariable) is a<br />
variable that you have assigned a result to, generally with an assignment statement<br />
(Zuordnungsanweisung):<br />
> x := 2 + 5;<br />
x := 7<br />
> x;<br />
7<br />
The progr<strong>am</strong>ming variable x now is a label for the result of 2+5.<br />
To clear a variable, you can type:<br />
> unassign('x');<br />
> x;<br />
x<br />
or:<br />
> x := 'x';<br />
> x;<br />
x<br />
The other kind of Maple variable is a mathematical variable or an unassigned variable (Platzhalter).<br />
These exist in the sense of algebraic unknowns, as in the case of:<br />
> z := 2+y;<br />
z := 2 + y<br />
Here, y is a mathematical variable, and z is a progr<strong>am</strong>ming variable because an expression has been<br />
assigned to it. If we now assign a value to y, y becomes a progr<strong>am</strong>ming variable, and is no longer an<br />
algebraic unknown:<br />
> y := 5;<br />
y := 5<br />
> z;<br />
7<br />
An equation (Gleichung) is different from an assignment statement (Zuordnungsanweisung). Consider<br />
the difference between:<br />
> a := 2;<br />
a := 2;<br />
105