[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help need for Differential algebraic equations
From: |
genehacker |
Subject: |
Re: Help need for Differential algebraic equations |
Date: |
Thu, 9 Oct 2008 10:09:21 -0700 (PDT) |
Thanks for the reply Olaf. I defnitely changed the function return variable,
that should be different from xdot. But i still have a problem of running a
simple differential algebraic equation. I am getting the same answer, if i
tried a much simpler set of equations(even though I didnot use an algebraic
equation here, I intend to use it later on). [ Also, you asked why I am
doing x(2) = f*x(6), thats is the type of algebraic equation i intend to
use]. Is there something inherently wrong with my code? I couldnot get much
help about this online.
**********code ********
function res = f(x,xdot,t);
res = zeros(3,1);
k12=0.1;
k23=0.7;
xdot(1) = -k12*x(1);
xdot(2) = k12*x(1) - k23*x(2);
xdot(3) = k23*x(2);
endfunction;
x0 = [100,0,0];
xdot0 =[-10,10,10];
t = linspace(0,50,50);
[x,xdot] = 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.425756E-11 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-tp19888756p19903261.html
Sent from the Octave - General mailing list archive at Nabble.com.