Borrar filtros
Borrar filtros

Disabling the case-sensitive mismatch error message

2 visualizaciones (últimos 30 días)
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,

Respuesta aceptada

Image Analyst
Image Analyst el 5 de Abr. de 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 comentarios
jan
jan el 17 de En. de 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
Kaustubha Govind el 17 de En. de 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!

Iniciar sesión para comentar.

Más respuestas (1)

Geoff
Geoff el 5 de Abr. de 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 comentarios
jan
jan el 17 de En. de 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
Walter Roberson el 17 de En. de 2013
The software has been issuing warnings about this since about R2007a-ish. That's a good 4 years, not "suddenly" at all.

Iniciar sesión para comentar.

Categorías

Más información sobre Programming en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by