[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Private function undefined
From: |
Carlo De Falco |
Subject: |
Re: Private function undefined |
Date: |
Mon, 11 Apr 2016 07:47:04 +0000 |
On 10 Apr 2016, at 14:03, Francesco Faccio <address@hidden> wrote:
> Dear all,
>
> I am writing a private function that checks the options of ode23 and ode45. I
> have moved part of the code from ode23.m to this private function but
> something is not working.
>
> At some time this function calls another private function
> (starting_stepsize.m) which is in the same folder and the output of the first
> test is
>
> ***** test # two output arguments
> [t, y] = ode23 (@fpol, [0 2], [2 0]);
> assert ([t(end), y(end,:)], [2, fref], 1e-3);
> !!!!! test failed
> 'starting_stepsize' undefined near line 101 column 27
>
> If I move starting_stepsize.m from the private folder to the folder where
> ode23 and ode45 are, my code works, the function starting_stepsize is called
> correctly and all tests are passed.
>
> Is there anyone who has had this problem or who can give me some suggestions
> on how to solve it?
>
> Thank you.
>
> Best regards,
>
> Francesco Faccio
The attached simple example works as expected for me,
so scoping of private functions should not be the source
of your problems ...
c.
private_example.tgz
Description: private_example.tgz
ATT00001.txt
Description: ATT00001.txt