help-octave
[Top][All Lists]
Advanced

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

RE: LSODE Problem: evaluating argument list element number 1


From: Kerin
Subject: RE: LSODE Problem: evaluating argument list element number 1
Date: Tue, 31 Jan 2012 10:03:07 +0800

Thank you. Could you please tell me how to define x in glycODE.m? If the
line of "x=[]" is uncommented, the error message would be shown as
following.
-----------------------------------------------------------
error: 1>glycSim
error:  'x' undefined near line 10 column 13
--------------------------------------------------------

Best,
Kerin
-----Original Message-----
From: Liam Groener [mailto:address@hidden 
Sent: Tuesday, January 31, 2012 2:20 AM
To: kerin
Subject: Re: LSODE Problem: evaluating argument list element number 1


also without looking int details, the very first statement in function
glycODE sets x to be an empty vector regardless of what is passed in the
function call. Therefore even x)1) is out of bounds.

On Jan 29, 2012, at 7:47 PM, kerin wrote:

> 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-e
lement-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]