|
From: | John W. Eaton |
Subject: | Re: more help needed with function handles |
Date: | Wed, 25 Mar 2020 13:43:53 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
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? Also, what happens if you add a 'clear functions' command just after changing to the subdir directory?
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.
jwe
[Prev in Thread] | Current Thread | [Next in Thread] |