code analyzer bar not indicating syntax errors

Code analyzer bar not indicating syntax errors.
clear on line 3 is mispelled but there is a green box in the code analyzer bar???
An error results in the command window when this code is run.
The code analyzer is enabled in Preferences.
I believe this has recognized this type of systax error in earlier editions.
Jack Koscinski

 采纳的回答

There are some problems that Code Analyzer's static analysis can detect, but a misspelled function name is not always something it can detect. [If you misspell it badly enough, like misspelling the x2fx function from Statistics and Machine Learning Toolbox as 2fx which is not a valid function name, Code Analyzer can detect it.] You intended that line to call the clear function, but how can you know just by looking at that file (static analysis) that there's no function named clea that is being called?

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Programming 的更多信息

产品

版本

R2020a

标签

Community Treasure Hunt

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

Start Hunting!

Translated by