Disabling the case-sensitive mismatch error message
5 views (last 30 days)
Show older comments
Hi,
Is there any way to turn off this error message?
Cannot find an exact (case-sensitive) match for 'lowpass' The closest match is: Lowpass in D:\Projects\Toolboxes\BSPToolbox\Common\Lowpass.m
Or, is it possible to switch the error message into a warning?
Thanks in advance,
0 Comments
Accepted Answer
Image Analyst
on 5 Apr 2012
Try renaming your program to lowpass.m. The problem is that everywhere else in your program you use lowpass but the filename is Lowpass and it warns. I think I had a user who upgraded to R2012a and it refused to run it (I'd have to check), whereas in prior versions it was just a warning. One weird thing is that some version control software (like Tortoise Subversion) will rename files to uppercase upon committing to the repository, and of course any user who downloads from the repository has the misnamed file and gets the error. I'm still trying to figure out how to prevent that automatic renaming. In the meantime, we just rename back to all lower case and the error is avoided.
3 Comments
jan
on 17 Jan 2013
The thing is that Matlab should not be case sensitive for precisely the reasons that Image Analyst describes. Why should he have to waste his time trying to change file name capitalization conventions of well established file and archive systems? Dear Mathworks: this is a BUG, it is NOT a feature, please come to your senses.
Kaustubha Govind
on 17 Jan 2013
Jan: Since I can't speak for the MATLAB development team, I would recommend that you either contact the MathWorks Technical Support team, or comment on the blog post, to get a more authoritative reply.
From my understanding, MATLAB was always case-sensitive on Linux, but not on Windows. This change seeks to make the Windows behavior in line with that on Linux. Unfortunately, I don't know much else about this change. Sorry!
More Answers (1)
Geoff
on 5 Apr 2012
How could it be a warning? It's an error. Case-sensitivity is a feature of the language. You can't change the language.
If you really don't want to type Lowpass in, then define your own function lowpass which calls Lowpass. Personally, I'd just make the effort to put the capital L in.
2 Comments
jan
on 17 Jan 2013
I disagree!!! How can it be an error if for the last 18 years that I have been using Matlab this always worked, and now it suddenly no longer works? I have literally decades worth of code that always worked fine and suddenly throws wobblies. If this is a feature of the language it needs to be enforced from day 1. If it's not then it's not a feature of the language. Mathworks are making a grave error in suddenly enforcing this because Windows file systems are case insensitive while Unix systems are not, so making updated versions of your code with different capitalization causes all manner of confusion for people who work across platforms. So we have to jump through all those complicated hoops, and for what??? I would like to start a petition that Mathworks revert to the previous practice and make this case checking optional so that you can do the right thing and switch it off and stop worrying about this irritating nonsense, which has already wasted many hours of my precious time.
Walter Roberson
on 17 Jan 2013
The software has been issuing warnings about this since about R2007a-ish. That's a good 4 years, not "suddenly" at all.
See Also
Categories
Find more on Variables 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!