|
From: | Markus Mützel |
Subject: | Re: more help needed with function handles |
Date: | Wed, 25 Mar 2020 19:37:43 +0100 |
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. Markus
diary2
Description: Binary data
diary3
Description: Binary data
diary4
Description: Binary data
diary5
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |