octave-maintainers
[Top][All Lists]
Advanced

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

LSODE Problem: evaluating argument list element number 1


From: kerin
Subject: LSODE Problem: evaluating argument list element number 1
Date: Sun, 29 Jan 2012 19:47:20 -0800 (PST)

Dear everyone!

I am running *glycSim.m* with function *glycODE.m *and perplexed by a
problem when using "*lsode"*. Please read the following lines.
-----------------------------------------------------------------------------------------------------

*glycSim.m*

% Loading model
global model
load glycModel

% Dimension of Stoichiometric matrix
dimS = size(model.S);
rankS = rank(model.S);

% Define concentrations variables: pool sizes and external concentrations
......

% Calculate the concentrations of the pools at steady state
......
......

......
......
% SECTION II: SIMULATION OF THE NON-LINEAR MASS BALANCE EQUATIONS
timeRange = [0 50];
x = *lsode*(glycODE,0,timeRange);
......
......


*glycODE.m*
function dxdt = glycODE(t,x)
x=[];
global k model ampplasma gluin ampin pyrplasma lacplasma hplasma h2oplasma

vhk = k(1)*(x(17)*x(1) - x(16)*x(2)/model.Keq(1));
vpgi = k(2)*(x(2) - x(3)/model.Keq(2));
......
......
v =
[vhk;vpgi;vpfk;vtpi;vald;vgapdh;vpgk;vpglm;veno;vpk;vldh;vamp;vapk;vpyr;vlac;vatp;vnadh;vgluin;vampin;vh;vh2o];

dxdt = model.S*v;
endfunction

-------------------------------------------------------------------------------------------------------

And the *errors* are shown as following lines:
----------------------------------------------------------
octave:9>glycSim
error: glycODE: A(I): index out of bounds; value 17 out of bound 0
error: called from:
error: C:\Octave\Octave3.4.3_gcc4.5.2\glycODE.m at line 10, column 5
error: *evaluating argument list element number 1*
error: C:\Octave\Octave3.4.3_gcc4.5.2\glycSim.m at line 77, column 17.
---------------------------------------------------------------------

Could anybody help me solve this problem? If you feel some details is
unclear is this post, please feel
free to reply or drop me an email.

Thanks.
Kerin






--
View this message in context: 
http://octave.1599824.n4.nabble.com/LSODE-Problem-evaluating-argument-list-element-number-1-tp4339989p4339989.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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