Your functions are not incorrectly written. However, this MLint check is not going to do what I think (from reading your other question) you want. It's not a very useful check - that's why it's off by default.
Consider that before your line
biggest=needlessDelegate(variable1, variable2);
you could have had the command load myData.mat
, and the .mat file could contain a variable needlessDelegate
. So until runtime, there's no way for MLint to know in general what things are functions and what things are variables.
The exception is really only when needlessDelegate
is defined prior to its call - for example if you preceded your line with the command needlessDelegate = @(x,y) x+y;
. You'll see then that the MLint message disappears.
As you can see, it's not a very useful check in general, which is why it's off by default.
Perhaps this example also gives an answer to your other question too - MATLAB is not able to have any idea of which things might be misspellings, or undefined variables, as you can just 'poof' things into existence at any time using load
, which can't be examined before runtime.