help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help need for Differential algebraic equations


From: genehacker
Subject: Help need for Differential algebraic equations
Date: Wed, 8 Oct 2008 15:22:11 -0700 (PDT)

Hi all,
 
    I am new to octave and i love it the best as an open source alternative
to matlab. I used lsode to solve ordinary diff equations, but now I do also
have some algebraic equations to solve along.

I came across this function 'dassl', which is supposed to solve differential
algebraic equations, but have problems using it. This is how i use it
currently and below is the error message. I have no idea what it is. Please
help!

******code*****

function xdot = f(x,xdot,t);
%define all parameter values viz. k12, k23,f86 etc here
xdot = zeros(9,1);
xdot(2) = k12*x(1) - k23*x(2);
xdot(3) = k23*x(2);
xdot(5) = k45*x(4) - k56*x(5);
xdot(6) = k56*x(5) - k67*x(6);
xdot(7) = k67*x(6);

x(8) = f86*x(6);
x(9) = f29*x(2);
endfunction;


x0 = ones(9,1)';
xdot0 =zeros(9,1)';
t = linspace(0,50,50);
dassl("f",x0,xdot0,t)

*****output******

 ***MESSAGE FROM ROUTINE DDASSL IN LIBRARY SLATEC.
 ***POTENTIALLY RECOVERABLE ERROR, PROG ABORTED, TRACEBACK REQUESTED
 *  AT T =    0.000000E+00  AND STEPSIZE H =    1.594388E-05  THE ITERATION
 *  MATRIX IS SINGULAR
 *  ERROR NUMBER = -8
 *
 ***END OF MESSAGE

 ***JOB ABORT DUE TO UNRECOVERED ERROR.
0          ERROR MESSAGE SUMMARY
 LIBRARY    SUBROUTINE MESSAGE START             NERR     LEVEL     COUNT
 SLATEC     DDASSL     AT T =    0.000000E+        -8         1         1

error: exception encountered in Fortran subroutine ddassl_
error: caught execution error in library function
-- 
View this message in context: 
http://www.nabble.com/Help-need-for-Differential-algebraic-equations-tp19888756p19888756.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]