"M-Lint cannot decide whether <name> is a variable or function, and assumes that it is a function, a warning generated for all functions
Background
I recently turned on the M-Lint warning. "M-Lint cannot decide if ... is a variable or function and assumes that it is a function" by This can be set to matlab to check the available functions before starting to try to detect variable names with errors.
M-Lint has been renamed as a code analyzer in recent versions of Matlab, but I am using Matlab2007b.
Question
All functions seem to generate this warning, even those that are in the same file. For example, in the code below needlessDelegatethis warning is generated when used.
? ?
function [biggest]=getBiggest(variable1, variable2)
biggest=needlessDelegate(variable1, variable2); %<-- needlessDelegate generates warning. 'M-Lint cannot decide whether <name> is a variable or a function and assumes it is a function'
end
function [biggest]=needlessDelegate(variable1, variable2)
if variable1>variable2,
biggest=variable1;
else
biggest=variable2;
end
end
'M-Lint , "needlessDelegate" , '