|
From: | Richard O. Legendi |
Subject: | Re: lsode: passing function body as a string is obsolete. Please use anonym,ous functions. |
Date: | Mon, 13 Dec 2010 14:40:19 +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 |
Thanks Martin! Great, it works! I think I would have never figured out that...Any suggestions how to deal with the other warning ("lsode: ignoring imaginary part returned from user-supplied function")?
Thanks guys, you really helped me a lot already! Richard On 2010.12.13. 14:16, Martin Helm wrote:
Am Montag, 13. Dezember 2010, 14:13:13 schrieb Martin Helm:You need to use it this way result = lsode(@(x, t) sqrt(1-t**2), 0, t)(1000); result = 0.78540In your example of course result = lsode(@(x, t) sqrt(1-t**2), 0, [0 1])(2); (I used t=linspace(0, 1,1000) in my example).
[Prev in Thread] | Current Thread | [Next in Thread] |