MATLAB: Do I receive an error when I create a variable using the ASSIGNIN function and then use the variable on the same line in MATLAB 7.0 (R14)

caseMATLABnamesamesensitive

When I execute the following commands in MATLAB 7.0 (R14):
clear all
assignin('base','Azimuth',1); Azimuth
I receive the following warning:
Warning: Could not find an exact (case-sensitive) match for 'Azimuth'. \MATLAB7\toolbox\map\map\azimuth.m is a case-insensitive match and will be used instead. You can improve the performance of your code by using exact name matches and we therefore recommend that you update your usage accordingly. Alternatively, you can disable this warning using warning('off','MATLAB:dispatcher:InexactMatch').
and the following error:
??? Error using ==> map\private\parseDistAzInputs
Not enough input arguments.
Error in ==> distance at 75
[useGeodesic, lat1, lon1, lat2, lon2, ellipsoid, ...
Error in ==> azimuth at 58
[dist, az] = distance(varargin{:});
The warnings and error messages only occur when I create a variable with the same name as an existing MATLAB function, except for case differences.

Best Answer

This bug has been fixed in MATLAB 7.0.4 (R14SP2).
The reason behind this is that the variable "Azimuth" is being assigned at the end of a line. Therefore, if a call to the assigned variable resides in the same line, MATLAB will look for any other variable or function that matches the (still unassigned) name "Azimuth".
For this particular case, this caused an error in trying to run the AZIMUTH function in the Mapping Toolbox.
To work around this issue in a previous version of MATLAB, place each command on a separate line. For instance:
clear all
assignin('base','Azimuth',1);
Azimuth