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

 채택된 답변

Steven Lord
Steven Lord 2020년 9월 14일

0 개 추천

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

태그

질문:

2020년 9월 14일

답변:

2020년 9월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by