[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: more help needed with function handles
From: |
Markus Mützel |
Subject: |
Re: more help needed with function handles |
Date: |
Wed, 25 Mar 2020 19:42:09 +0100 |
Am 25. März 2020 um 19:37 Uhr schrieb "Markus Mützel":
> Am 25. März 2020 um 18:43 Uhr schrieb "John W. Eaton":
> > Thanks for the responses.
> >
> > It seems a little strange to me that after changing to subdir where
> > there is a sin.m file, Matlab is warning that the presence of that file
> > could cause trouble and which ('sin') finds the sin.m file but sin(pi)
> > calls the built-in function!
> >
> > Now I'm curious to know whether the behavior is different if you enter
> > the commands one at a time at the command line instead of executing the
> > script file?
> Same result (diary2)
>
> > Also, what happens if you add a 'clear functions' command
> > just after changing to the subdir directory?
>
> "diary3" was executed as a script with that addition.
> "diary4" was executed line by line.
>
> No difference.
>
> > Maybe I need to try with a different function instead of sin, which I
> > suppose is not defined as a generic function but as a method for @double
> > and @single objects? That would explain why it is found ahead of the .m
> > file.
>
> It is surprisingly hard to find a built-in function that accepts a double
> input that is not implemented as a class method.
> I finally tried with "isstr" (diary5). I hope that helps.
And another one without the "clear functions" (diary6).
> Markus
diary6
Description: Binary data
Re: more help needed with function handles, Markus Mützel, 2020/03/25
Re: more help needed with function handles, Marco Caliari, 2020/03/25