help-octave
[Top][All Lists]
Advanced

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

Re: lsode problem


From: Juan Pablo Carbajal
Subject: Re: lsode problem
Date: Thu, 6 Sep 2012 17:17:40 +0200

On Thu, Sep 6, 2012 at 2:17 PM, sassir <address@hidden> wrote:
> Hello i'm a real Ocatve newbie and have a problem with lsode.
> i want to solve an ode of the form c*dx/dt= ax+b but somehow i have some
> problem in using "lsode".
> I get the following error messages:
>
> error: `t' undefined near line 2 column 25
> error: evaluating argument list element number 1
> error: evaluating argument list element number 1
> error: called from:
> error:   f at line 2, column 3
>
> I hope you can help and tell me what i did wrong!
>
> http://octave.1599824.n4.nabble.com/file/n4643805/f.m f.m
>
>
>
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/lsode-problem-tp4643805.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave

Hi,

I see at least two problems.

1. What is x(t) inside your function f. the value of t will be a real
number, so if x is a vector this will fail. Otherwise, if x is a
function, you have to provide a definition for it.

2. lsode requires a time interval for the integration, this is the
third input to the function lsode. You must provide a vector of values
(as you apparently had, but you commented it out) or two values (t
inital and t final)

Cheers,

-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

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