MATLAB: Dir problem

dirdirectory

I try to find files with the function DIR. Unfortunately I get many more then the ordinary 'dos' of windows DIR function gets.
This is the query:
dir('abc_1.*')
I do not only get: abc_1.avi, abc_1.mat, abc_1.bck but also: abc_10.avi, abc_11.mat, abc_1000.bck
Is there any way to avoid this?
Thanks,
Jeroen

Best Answer

Hi! Thanks for looking into it. Apparently the problem is solved in version 12a. I work with version Matlab 7.10.0 (R2010a)
A student of mine (Marije) found the answer though. here is the problem and the solution:
>> ls
. Untitled2 - Copy (5).m Untitled20.m
.. Untitled2 - Copy.m Untitled200.m
Untitled2 - Copy (4).m Untitled2.m
>> dir('Untitled2.*')
Untitled2 - Copy (4).m Untitled2.m
Untitled2 - Copy (5).m Untitled20.m
Untitled2 - Copy.m Untitled200.m
>> dir('Untitled20.*')
Untitled20.m Untitled200.m
But This is the answer!! The '.' is the problem and '..' is the solution
>> dir('Untitled2..*')
Untitled2.m
Jeroen