Fighting case sensitivity in Win7 / Matlab R1011b
Show older comments
Maybe somebody here can tell me if I am doing something fundamentally wrong or whether I'm dealing with a new issue. I recently upgraded to Matlab R1011b under Windows 7. I need to install a supplementary command set, which to my knowledge has worked with past versions of Matlab through R1011a, also with Windows 7. These supplementary commands are installed in a separate folder with path
C:\Program Files (x86)\XXXX\MATLAB
To make these files accessible, a STARTUP.M file is set up in the Matlab folder at \toolbox\local\STARTUP.M. When it starts, MATLAB appears to find this scripts and execute it successfully, and displaying PATH shows that the additional path line is present at the front of the PATH environment. Everything looks right, with no cases inconsistency. There are a number of commands implemented in the supplementary folder as *.mex86 commands with names in lower-case, and with corresponding *.M scripts with names in upper case providing command line help... these all seem to be found and run correctly. The command that I want to execute is not one of these -- it is a pure M-file script in the same folder. An example is a script called INIT.M (name not my fault!). The command 'help INIT' (or 'help init') finds this script and displays the dcumentation lines.
The installations are done as administrator, with the software executed under a user account. When I attempt to execute this script...
>> INIT
I get back a diagnostic
"Cannot find an exact (case-sensitive) match for 'INIT'. Do you want INIT (in C:\Program Files\XXXX\MATLAB\INIT.M)?"
D*** right I do. Typing the command as lower case 'init' makes no difference.
Any ideas? Am I overlooking something obvious? something 'Windows'?
1 Comment
Jan
on 15 Sep 2011
I think using different case for the compiled files and M-files is confusing. Matlab prefers the compiled files, but this distinction might fail, if there are additional differences in the case.
Accepted Answer
More Answers (2)
Walter Roberson
on 15 Sep 2011
You could try
warning('off','MATLAB:dispatcher:InexactMatch')
but I do not know if that would help in this situation.
2 Comments
Jan
on 15 Sep 2011
I do like the new case-sensitivity under Windows. I'm using functions names with CamelCase, if the functions can be accessed from anywhere and sulkingCamelCase for functions, which should be used locally only (e.g. private functions). Together with Matlab's lowercase syntax, I have a certain protection for not using built-in functions by accident. E.g. there was no "beep" command in ancient Matlab versions. If I edit one of my very old M-files and find "Beep('off')" I know, that I meant my own beeping function.
With disabled IndexactMatch corresponding errors are harder to find, if possible at all.
In consequence I would not try to _fight_ the case-sensitivity as the OP said in the subject, but to learn to _use_ it.
Kelsie Tse
on 15 Sep 2011
Kelsie Tse
on 16 Sep 2011
0 votes
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!