21.06.2014 Aufrufe

Beispiel - SAM - ETH Zürich

Beispiel - SAM - ETH Zürich

Beispiel - SAM - ETH Zürich

MEHR ANZEIGEN
WENIGER ANZEIGEN

Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.

YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.

%f,\\alpha(0)=%f,p(0)=%f’,g,l,y0,v0));<br />

9 i f (nargin > 3),<br />

p r i n t(’-depsc2’, s p r i n t f(’%s_alpha.eps’,filename)); end<br />

0<br />

1 % Plot of velocity vs. time<br />

2 tg = h*(0:N);<br />

3 f i g u r e(’name’,’Pendulum velocity’);<br />

4 p l o t(t,y(:,2),’g-’,tg,y_p,’r-+’);<br />

5 x l a b e l(’{\bf time t}’,’fontsize’,14);<br />

6 y l a b e l(’{\bf velocity p}’,’fontsize’,14);<br />

7 t i t l e( s p r i n t f(’Pendulum g = %f, l =<br />

%f,\\alpha(0)=%f,p(0)=%f’,g,l,y0,v0));<br />

8 i f (nargin > 3), p r i n t(’-depsc2’, s p r i n t f(’%s_p.eps’,filename));<br />

end<br />

9<br />

0 % PLot of trajectory in phase space<br />

1 f i g u r e(’name’,’Pendulum trajectory’);<br />

2 ph = p l o t(y(:,1),y(:,2),’g--’,y_sv,y_p,’r-+’);<br />

3 set(ph(1),’linewidth’,2);<br />

4 x l a b e l(’{\bf angle \alpha}’,’fontsize’,14);<br />

5 y l a b e l(’{\bf velocity p}’,’fontsize’,14);<br />

6 t i t l e( s p r i n t f(’Pendulum g = %f, l =<br />

%f,\\alpha(0)=%f,p(0)=%f’,g,l,y0,v0));<br />

Numerische<br />

Mathemtik<br />

R. Hiptmair<br />

rev 35327,<br />

25. April<br />

2011<br />

1.4<br />

p. 109

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

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!