Comments on: Function Name Case Sensitivity in MATLAB R2011b https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/?s_tid=feedtopost News from the intersection of MATLAB, Community, and the web. Fri, 01 Mar 2013 07:36:59 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: student https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-38201 Fri, 01 Mar 2013 07:36:59 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-38201 MATLAB R2011b
also that error can appear if file name have extension “name.M”
changing to “name.m” helped to solve that problem

]]>
By: Patrick https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-15901 Wed, 05 Dec 2012 19:18:31 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-15901 Aurelien is right, the solution is here: https://www.mathworks.com/matlabcentral/fileexchange/36539-fixcase&watching=36539#comments

]]>
By: Ray Hoff https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-15126 Fri, 30 Nov 2012 20:12:00 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-15126 Moreover, on a Mac running OSx 5, the filename of the matlab file shows up in the current folder with capitalization, while the mac folder is lower case. This sets up two parallel directories and MATLAB thinks that there is a duplicate m file in the path.

If you have a fix for that without making all my filenames lower case, I would love to hear it.

]]>
By: C Nataraj https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-14322 Sat, 24 Nov 2012 22:37:25 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-14322 I have the same problem as Mr Bernd Eppinger. I have literally over half a million files created over two decades of using MATLAB. This ad-hoc approach from what has become a standard engineering software is unacceptable. I am going to rethink if I should integrate MATLAB or not in my next edition of my text book (which currently endorses MATLAB). Backward compatibility is a must as anybody who has pursued research can testify.

Please fix this as soon as possible.

With much hope that reason will prevail to ensure longevity for MATLAB.

]]>
By: Bernd Eppinger https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-10892 Fri, 12 Oct 2012 09:49:05 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-10892 MATLAB 4 on WINDOWS forced users to use lowecase names, while the OS, or more precisely FAT16, forced the filenames to be uppercase, including the filename extension. Users were forced to create inexact matches, because otherwise the code didn’t run.

I have still large libraries from this time. And now, TheMathWorks is telling me that they have changed their mind and now need a lowercase filename extension and matching filenames. According to Mathworks, I have to rewrite everything in order to be able to further use it. It is a complex and time consuming manual process, and it costs my company 100EUR per hour.

Why is TheMathWorks intentionally implementing such user-unfriendly not-backwards-compatible harassments in their code? Dont’t they think about their customers? Can’t you imagine that your users have better things to do than constantly updating their code basis to keep everything running? Why is it not possible at least to switch off this error, as it was the case with the warning?

@Michael Katz:
The Warning Message was not telling me that this would be converted to an error. It only said that there could be performance impacts. Here is the warning from MATLAB 7.5.0:

Warning: Could not find an exact (case-sensitive) match for .
.m is a case-insensitive match and will be used instead.
You can improve the performance of your code by using exact
name matches and we therefore recommend that you update your
usage accordingly. Alternatively, you can disable this warning using
warning(‘off’,’MATLAB:dispatcher:InexactMatch’).

Please provide a fix for this problem as quickly as possible!!!

Best regards,
Bernd

]]>
By: Aurélien https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-9970 Wed, 05 Sep 2012 08:10:14 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-9970 @paradize , you may try fixcase :
https://blogs.mathworks.com/pick/2012/06/29/fixcase-fix-your-code-to-use-exact-case-match-when-calling-functions/

]]>
By: paradize https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-9969 Wed, 05 Sep 2012 05:26:05 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-9969 Hi, I have two question. Firstly, in our group we share our MATLAB source code with SVN, unfortunately, it seems that’s not possible to commit changes that are only change capitalization under windows – hence this error is difficult for us to fix – one work around would be to change the function calls rather than the filenames but it’s not ideal…
Secondly, is there a way of locating all potential case mismatched in a large source code base, without have to run every code path…
That’s basically the two problem we face to upgrade MATLAB to the latest version. Any suggestion would be welcome.

Regards

]]>
By: Åsmund https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-8839 Thu, 03 May 2012 11:09:15 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-8839 I support Julian’s comment about tab completion.

Also, when I change folders using tab completion to find folder names folders the string returned from pwd and cd depends on what was input to tab-completion and cd, i.e., they don’t return the actual configuration of capital and non-capital letters in the folder name.

This causes problems when script files are named after folder name and executed from other scripts using

directory = deblank(regexp(pwd, ‘\’,’split’));
eval(char(strcat(directory(numel(directory)),’_name’)))

as the case sensitive eval does no longer evaluate the file if a wrong capitalization arises from the tab completion.

If anyone know a better way to implement the automatic naming and evaluation of files based on folder name, please let me know :)

Regards,
Åsmund

]]>
By: Michael Katz https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-8674 Mon, 19 Mar 2012 18:43:35 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-8674 Paul,
Unfortunately there is not that I am aware of. We’ve had the warning on for years indicating that this was going to be an error, and this release was the one where we finally flipped it to error.

I don’t have a good solution for a large library. You can use a command like:

dbstop if error MATLAB:dispatcher:InexactCaseMatch

while will pause execution when the error is thrown, giving you a chance to fix the files one call at a time.

There might be a trick one can use with FIND and GREP to locate instances of mismatched case use in files and fix them, at least within a directory or two. I am not really an expert on putting those together, though.

]]>
By: Paul https://blogs.mathworks.com/community/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-8644 Wed, 14 Mar 2012 10:08:46 +0000 https://blogs.mathworks.com/desktop/2011/10/24/function-name-case-sensitivity-in-matlab-r2011b/#comment-8644 This error is casuing me serious problems. Large libraries which were developed over years no no longer run. There are liliterally 100s of file to search through and correct.

Is there any possability to switch off this error as it was possible to switch off the warning?

best regards

Paul

]]>