help-octave
[Top][All Lists]
Advanced

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

lsode: passing function body as a string is obsolete. Please use anonym,


From: Richard O. Legendi
Subject: lsode: passing function body as a string is obsolete. Please use anonym,ous functions.
Date: Mon, 13 Dec 2010 13:03:30 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

Hi all,

I haven't used Octave so far, but I find it pretty useful, thanks for this great application!

I'm having some minor problems using it. I'm trying to connect it with Java with JavaOctave (which is working perfectly), but there's an example on the following page:

        http://kenai.com/projects/javaoctave/pages/Home

When I tried to run it in Octave it generates a warning:

octave:2> result = lsode("sqrt(1-t**2)", 0, [0 1])(2);
warning: lsode: passing function body as a string is obsolete. Please use anonymous functions.
warning: lsode: ignoring imaginary part returned from user-supplied function
octave:3> result
result =  0.78540

I wanted to eliminate it, but I keep getting a very different result:

octave:4> result = lsode(@(t) sqrt(1-t**2), 0, [0 1])(2);
octave:5> result
result =  0.84147
octave:6>

Any suggestions how to remove that warning? Any help would be greatly appreciated!

Best regards,
Richard


reply via email to

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