Does the MATLAB Code Compatibility Analyzer always detect warnings shown in the editor?
13 views (last 30 days)
Show older comments
MathWorks Support Team
on 19 Jan 2026 at 0:00
Edited: MathWorks Support Team
on 20 Jan 2026 at 2:44
I noticed that when using get_param(0,'DefaultLineFontName') in MATLAB R2023a, a warning appears in the Command Window indicating that this usage will not be supported in future releases. However, the MATLAB Code Compatibility Analyzer does not flag this as a potential issue.
I believe that the MATLAB Code Compatibility Analyzer should detect errors and warnings that are shown in the MATLAB Editor. Is this understanding correct? Why does the Analyzer not display warnings for potential issues with the get_param command in future releases?
Environment:
OS: Windows 11
Accepted Answer
MathWorks Support Team
on 20 Jan 2026 at 0:00
Edited: MathWorks Support Team
on 20 Jan 2026 at 2:44
Cause:
The MATLAB Code Analyzer in the Editor is designed to display information, warnings, and errors relevant to a user's code. However, it does not necessarily flag every warning or error that might occur during code execution. Some warnings or errors only appear when the code is actually run, not during static analysis in the Editor.
Workaround:
Users should be aware that not all runtime warnings or deprecation notices will be detected by the MATLAB Code Compatibility Analyzer. It is recommended to review the MATLAB release notes and deprecation warnings in the Command Window during code execution.
Permanent Solution:
For future compatibility, avoid using deprecated or soon-to-be-unsupported commands and parameters, such as get_param(0,'DefaultLineFontName'). Regularly check the MATLAB documentation and release notes for updates on deprecated features, and update your code accordingly.
0 Comments
More Answers (0)
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!