MATLAB: What does this error message mean

matlab function

Undefined function or variable 'fcn'.
Error in tabpanelcopyfcn (line 40) switch fcn

Best Answer

It means that the variable or function fcn cannot be found. Run:
dbstop if error
And then reproduce the error. This will stop with the debugger on this line and you'll be able to inspect everything and see why it's not there.