How can matlab be unable to find an anonymous function?
matlab
Solution
Possible Workaround: restart Matlab.
After restarting MATLAB the Problem didn't occur ... so far.
I guess buggy ML debugger was buggy.
Problem
I get a strange error when running my script: ``` Unable to find function @(x) exp(x) within H:\blabla\myClass.m. ``` when I debug I get: ``` 34 b=myAnonymousFunction(a) K>> myAnonymousFunction(3) Unable to find function @() exp(x) within HH:\blabla\myClass.m. K>> class(myAnonymousFunction) ans = function_handle ``` A minimal example I was trying to produce worked fine. Do You have any Idea where the error comes from and what it means? Because he obviously can find the definition of insanity...ahh... myAnonymousFunction. Is it just a bug? I read something on matlabcentral but its 7 Years old and doesn't give an explanation. Further explanation: I'm running MATLAB 2012 b under Windows 8 64 bit. The source files were originally written under a 64 bit Linux. I don't think it's relevant but myAnonymousFunction is a parameter to a function in myClass and stored within a cell array. So it's like this: file myClass.m: ``` classdef myclass < handle properties x=1337; myAnonymousFunctions; end methods function new = myClass(myAnonymousFunctions) new.myAnonymousFunction=myAnonymousFunction end function show(o) disp(myAnonymousFunction{1}(o.x)); end end end ``` and gets called like ``` myMyclass = myClass({@(x)exp(x)}) myMyClass.f(); ```