code analyzer bar not indicating syntax errors

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

Steven Lord
Steven Lord il 14 Set 2020
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?

Più risposte (0)

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by