Scilab, Exponentielles Wachstum/Zerfall

Juli 18th, 2007 Autor: Phillip Kroll -

Hier der Scilab Code zum plotten von Exponentiellen Wachstums- bzw. Zerfallsprozessen [y=x0*e^(x*a)] mit der dazugehörigen Trajektorie.

clf;

// Anfangsparameter
x0 = -4;
a = -0.05;

// Beschriftung
labelStr = "(a=" + string(a) + " x0=" + string(x0) + ")";

// x(t)
y=x0*%e^(x*a);

// x'(t)
ydot = x0*a*%e^(x*a);

// oberer graph, x(t) gegen t
subplot(2,1,1);
plot(x, y );
set( gca(),"grid",[1 1]);
xtitle( "Zeitverlauf " + labelStr, "t", "x(t)");

// unterer graph, x(t) gegen x'(t)
subplot(2,1,2);
plot(y, ydot );
set( gca(),"grid",[1 1]);
xtitle( "Trajektorie " + labelStr, "x(t)", "x''(t)" );

Exponentielles Wachstum bzw. Zerfall

Bisher keine Kommentare für diesen Eintrag...

0 response(s) to Scilab, Exponentielles Wachstum/Zerfall

    Kommentare sind für diesen Beitrag geschlossen.