04.03.2013 Aufrufe

PDF-Version - am Institut für Baustatik

PDF-Version - am Institut für Baustatik

PDF-Version - am Institut für Baustatik

MEHR ANZEIGEN
WENIGER ANZEIGEN

Erfolgreiche ePaper selbst erstellen

Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.

For a par<strong>am</strong>etric plot, use the syntax plot ([fx, fy, range]). For ex<strong>am</strong>ple:<br />

> plot ([sin(t), cos(t), t = -Pi..Pi])<br />

To generate 3-D plots you use the plot3d command. For more details on plotting commands, you can<br />

see ?plot and ?plot3d, or consult the Graphics chapter of the learning guide.<br />

Some ex<strong>am</strong>ples of how to generate Fortran 77 or C code:<br />

> f := 1-2*x+3*x^2-2*x^3+x^4;<br />

f := 1-2*x+3*x 2 -2*x 3 +x 4<br />

> fortran(f);<br />

t0 = 1-2*x+3*x**2-2*x**3+x**4<br />

> fortran(f,optimized);<br />

t1 = x**2<br />

t2 = alog(t1)<br />

t4 = sqrt(2.E0)<br />

t5 = t2**2<br />

t7 = 0.3141593E1*t2-t4*t5<br />

> A := array(1..2,1..2,[[1,x],[2,3]]):<br />

> Ainv := array(1..2,1..2,[]);<br />

> with(linalg):<br />

Warning, new definition for norm<br />

Warning, new definition for trace<br />

> Ainv := inverse(A);<br />

> fortran(Ainv);<br />

Ainv(1,1) = -3/(-3+2*x)<br />

Ainv(1,2) = x/(-3+2*x)<br />

Ainv(2,1) = 2/(-3+2*x)<br />

Ainv(2,2) = -1/(-3+2*x)<br />

> readlib(C);<br />

> C(Ainv);<br />

Ainv[0][0] = -3.0/(-3.0+2.0*x);<br />

Ainv[0][1] = x/(-3.0+2.0*x);<br />

Ainv[1][0] = 2.0/(-3.0+2.0*x);<br />

Ainv[1][1] = -1/(-3.0+2.0*x);<br />

113

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!