When I use a function name such as SIN as a variable name inside another function, I cannot access the SIN function even though I clear the variable previously. If the same steps are executed in a script or at the command line, then it gives the expected result and allows access to the function.
For example, the following function when executed results in an error.
function foosin = 5;clear sin;sin(pi)
The error obtained is:
??? Reference to a cleared variable sin. Error in ==> foo at 4 sin(pi)
Expected Result: Even if a function name is used as a variable, the clearing of this variable from the workspace should once again allow access to the said function.
Best Answer