|
"Dhrue " <dhritiman-bhattacharya@uiowa.edu> wrote in message <h3l0n5$k6i$1@fred.mathworks.com>...
> "Matt Fig" <spamanon@yahoo.com> wrote in message <h3jk67$4hb$1@fred.mathworks.com>...
> > "Dhrue " <dhritiman-bhattacharya@uiowa.edu> wrote in message <h3ji4k$q71$1@fred.mathworks.com>...
> > > function index = firm_size(r,w,z)
> > > index=find(fl(r,w,z) < 10);
> > > end
> > > When I type firm_size(1,1,z_grid) (where z_grid is a known vector) I get the following error. ?? Subscript indices must either be real positive integers or logicals.
> > >
> > > However when I type find(fl(1,1,z_grid) < 10) in the command window it works just fine. Please can anyone spot the error in my function file.
> > > Thanks
> > > Dhriti
> >
> >
> >
> > And fl is....
>
>
> Its another function file
well, it looks like you have a variable FL in your file...
do this:
- edit your function...
- set a break-point (dbstop) just before the call to FL...
- run your function...
- it stops...
- at the command prompt, type
whos fl;
which fl -all;
- look at the results
us
|