help-octave
[Top][All Lists]
Advanced

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

Re: Error in ode45


From: c.
Subject: Re: Error in ode45
Date: Wed, 18 Jan 2012 06:28:58 +0100

On 18 Jan 2012, at 02:56, Maurício Melo Câmara wrote:

> Hi!
> 
> I'm trying to solve a system of ODE's with:
> [t,y] = ode45('myfun', span, yo)
> where 'myfun' declares a function in the form y' = f(t,x), and 'myfun' is in 
> the same folder where the file calling ode45 is, but Octave is returning the 
> following error:
> 
> error: First input argument must be a valid function handle
> error: called from: /home/octave/odepkg-0.8.0/ode45.m at line 62, column 5
> 
> Isn't 'myfun' in the command above a valid function handle?
no, 'myfun' is a string.
@myfun is a function handle.

This is explained in the manual, in section "11.10.1 Function Handles"

> I'm still not able to solve this problem.
> Could anyone help me?
> 
> Thanks.
c.



reply via email to

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