I can barely remember a MATLAB version that did not produce an inexact case match warning if you used the wrong capitalization of a function name. Now, the days of willy-nilly capitalization in MATLAB are over. Starting in R2011b, that long-time warning is now an error.
Here is the warning message in R2010a by calling “foo.m” with the command “Foo“:
Warning: Could not find an exact (case-sensitive) match for 'Foo'. ../foo.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:InexactCaseMatch'). This warning will become an error in future releases.
As promised, R2011b is the future release where this is now an error:
Cannot find an exact (case-sensitive) match for 'Foo'. Do you want: foo (in ../foo.m)?
This error identifier for this message is the same as the old warning: 'MATLAB:dispatcher:InexactCaseMatch'. If you still have any misspelled functions in your code, they should be spot by running the code and looking for these errors. Before launching your main script, run the command:
dbstop if error MATLAB:dispatcher:InexactCaseMatch
and your program will pause whenever this error occurs.
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.