[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lsode: passing function body as a string is obsolete. Please use ano
From: |
Martin Helm |
Subject: |
Re: lsode: passing function body as a string is obsolete. Please use anonym, ous functions. |
Date: |
Mon, 13 Dec 2010 14:16:20 +0100 |
User-agent: |
KMail/1.13.5 (Linux/2.6.34.7-0.5-desktop; KDE/4.5.4; x86_64; ; ) |
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.78540
In 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).