MATLAB: Does saving a MAT-file as A.mat give me an error in MATLAB 6.0 (R12)

MATLAB

Why does saving a MAT-file as A.mat give me an error in MATLAB 6.0 (R12)?
When I run the following code:
x=1;
y=2;
z=3;
save A
clear all
load A
I get the following error message:
??? Error using ==> load
Unknown text on line number 1 of ASCII file d:\A.mAt
"MATLAB"
See FILEFORMATS for a list of known file types and the functions used to read them.
When I run the following code, which is exactly the same as above, except the name of the variable and MAT file (it changed from A to B):
x=1;
y=2;
z=3;
save B
clear all
load B
I do not receive and error message.

Best Answer

This issue has been fixed in MATLAB 6.5 (R13).
For previous versions of MATLAB, you can use the functional form of the LOAD command. For example:
x=1;
y=2;
z=3;
save A
clear all
load('A.mat')