[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
System of ODE - part III
From: |
Dennis Bayrock |
Subject: |
System of ODE - part III |
Date: |
Tue, 02 Oct 2001 19:05:34 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4) Gecko/20010913 |
Hello!
I want to thank everyone again in helping me (particularly Przemek
Klosowski!) in helping me to understand Octave's syntax. I am very
grateful. With some decifering, I have managed to properly enter my own
model consisting of a system of differential-algebraic equations into
Octave in order for it to integrate the equations. I am happy to report
that it works very well! The results with initial test parameters are
precisely what was expected!
Now, is there a way to have Octave determine values for multiple
initial constants that are part of my model so that a value from one of
the integrated equations can match a specified value? Basically I want
to curve fit the resulting plots to my actual experimental data and have
Octave determine the best values for the constants that would accomplish
this. In the past I have used Excel's SOLVER function to accomplish this
task but wish to know if Octave can do the same thing.
Again I would humbly ask that someone would give me an actual
example that I could enter into Octave so that I can learn by example.
As I mentioned before I am not an engineer or a mathematician but would
like to learn more about the mathematics in this area of research.
If a hypothetical example would be of use as a base, then:
function res = f (x, xdot, t)
D=0.02
umax=0.4
res = zeros (3,1);
res(1) = xdot(1) - D*x(1)*x(2)*xdot(3);
res(2) = xdot(2) - umax*x(1)*x(3)*xdot(1);
res(3) = xdot(3) - x(1) - D*xdot(1) - xdot(2);
endfunction
x0 = [5,50,0];
xdot0 = [0,0,0];
t = linspace (0, 100, 1000);
x = dassl ("f",x0,xdot0,t);
plot (t,x)
pause
Thanks all in advance!
Dennis Bayrock, P.hD
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- System of ODE - part III,
Dennis Bayrock <=