Matlab can not find my m-files and gives this failure notice even when in the path.
Show older comments
>> [f1 f2] = READ2F ('4RA1324A.DAT'); Cannot find an exact (case-sensitive) match for 'READ2F'. Do you want: READ2F (in C:\Users\xxx\Documents\MATLAB\READ2F.M)?
My old READ2F.m file is in the path, yet I get this message. Same result for ALL and ANY m files attempted.
------Interestingly, no opportunity to say "yes" to this question. Clarity greatly appreciated.
Answers (4)
Jan
on 11 Oct 2011
Do you use the exact upper/lower case of the functions? Please check this by:
which read2f -all
What does "same result for ALL and ANY m files attempted" mean exactly?
Walter Roberson
on 11 Oct 2011
I remember that perhaps a month ago someone ran in to something similar. I seem to recall that it was a MATLAB PATH problem for them -- a typo along the way.
Errors of this nature can sometimes also happen if there are spaces in directory names that are not being protected against. For example,
cd C:\Users\Walter Roberson\Documents
is a problem because the command/function duality of MATLAB would treat this as
cd('C:\Users\Walter','Roberson\Documents')
MATLAB PATH problems can also occur when networked filesystems are involved, if one of the systems sees the file as being in a different location than the other does. Or sometimes networked file systems are obstinate about remote authentication and can refuse to believe that you (remotely) are the person who (locally) owns the files when exclusive access owner or group access has been configured.
Lloyd
on 12 Oct 2011
0 votes
1 Comment
Walter Roberson
on 12 Oct 2011
To check: you are indicating that when you fopen() that file, that after that it complains about not being able to find matches for everything ?
Hmmm... could you try
which -all fopen
just in case somehow your own fopen.m is in the path ?
Jerome
on 9 Nov 2011
0 votes
Probably because of this: http://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/
Try renaming the function's file extension *.m as *.M, or vice versa.
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!