Wed 04 Jan 2012 03:56:52 PM UTC, comment #2:
First, there are no "built-in variables" in Octave now. Symbols like "pi" and "NaN" that are given special treatment by the inline function are functions, not variables.
The confusing error message about 'x' undefined happens because by default, inline functions use 'x' as their argument when no other variables are discovered in the expression. That is somewhat strange, but compatible with Matlab.
Matlab's inline function does not give 'e' or 'NA' special treatment.
So now I suppose that we will see bug reports about how
is not compatible with Matlab (Matlab will include 'e' in the list of arguments and Octave will not do that now).
To be fair, this problem already existed for 'NA', but just came to my attention because of this report.
Unfortunately, I don't think the list of symbols that are handled specially by Matlab's inline function are documented.
It looks like we only document 'i' and 'j' and the wording could be better.
|