Why do I receive a warning about an inexact match when running a MATLAB file in MATLAB 7.0 (R14)?

1 Ansicht (letzte 30 Tage)
When I run a MATLAB File in MATLAB 7.0 (R14), I receive the following warning:
Warning: Function call FOO invokes inexact match C:\MATLAB7\work\foo.m.
Note that if I run this code again, I do not receive a warning.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 4 Jun. 2012
The reason that you are receiving a warning about an inexact match is due to the fact that the method being invoked does not match the case (i.e. uppercase, lowercase) of the function call. MATLAB is case-sensitive on the Windows platform, as of MATLAB 7.0 (R14) with regards to MATLAB file functions, which is a change from previous versions.
For example, if you have a function called foo.m on your path, a call to 'FOO' will result in a call to the function, but it will also produce a warning. This will only happen the first time that the method is called.
In order to eliminate this issue, change the case of your function call to match that of your function name, i.e. to call the function 'foo.m', use lowercase letters, i.e. 'foo'.
You can use the following MATLAB Central file to identify such issues:
Note that MathWorks does not guarantee or warrant the use or content of these submissions. Any questions, issues, or complaints should be directed to the contributing author.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by