MATLAB: Does the DIR command return the complete path when no wildcard is used, in MATLAB 6.5 (R13) on the Linux platform (kernel 2.6.x)

2.66.5dirkernellinuxMATLABpathr13

I am running MATLAB 6.5 (R13) on Redhat Linux 8.0, Kernel: 2.6.4.
When I execute the command:
d = dir(strcat('/home/man/Documents/mlabcode/', 'a1.m'))
at the comand line in MATLAB 6.5 (R13) on a Linux platfrom featuring the 2.6.x kernel, I receive the following output
%%% BEGIN ERROR OUTPUT %%%
b =
name: '/home/man/Documents/mlabcode/a1.m'
date: '05-Oct-2005 11:29:30'
bytes: 11
isdir: 0
%%% END ERROR OUPUT %%%
The output I am expecting is
%%% BEGIN EXPECTED OUTPUT %%%
b =
name: 'a1.m'
date: '05-Oct-2005 11:29:30'
bytes: 11
isdir: 0
%%% END EXPECTED OUTPUT %%%

Best Answer

This is a bug in MATLAB 6.5 (R13), in the way that MATLAB handles the DIR command on Linux. This issue has been resolved in MATLAB 7.0 (R14).
To work around this issue in the previous versions of MATLAB, instead of providing the argument to the DIR command, use a wildcard. For example:
d = dir(strcat('/home/man/Documents/mlabcode/', 'a*.m'))
This will return the correct/expected output
%%% BEING OUTPUT %%%
b =
name: 'a1.m'
date: '05-Oct-2005 11:29:30'
bytes: 11
isdir: 0
%%% END OUTPUT %%%