Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Replaces removed or discouraged MATLAB functions and anti-patterns with modern equivalents, guided by Code Analyzer diagnostics.
88% 92%+4 ptsof test cases passed
Passed 23 of 25 test cases with the skill, and 22 of 25 without it.
A web service endpoint in MATLAB parses numeric array input strings using `str2num`. Security reviewers warned that this call can execute arbitrary workspace code. How should `str2num` be invoked to restrict expression evaluation?
Sets the Evaluation option to restricted when calling str2num
3 of 3 safety checks passed
Replace removed or discouraged MATLAB functions and anti-patterns with modern equivalents. This skill is the resolver — the MCP tool check_matlab_code (MATLAB's Code Analyzer) is the detector.
Terms used in this skill:
check_matlab_code reports a lifecycle diagnostic — any of these three
wordings, matched case-insensitively (STRMATCH is not recommended is the
same signal as the lowercase form):
'X' is not recommended... (severity: info)'X' will be removed in a future release... (severity: warning)'X' has been removed... (severity: error — the code errors today)containers.Map, bsxfun, str2num, eval, clear all — scan the source, not just the diagnostics (see Conventions)This skill swaps removed or discouraged APIs for modern equivalents. It does not:
matlab-optimize-performancearguments blocks, inputParser/validateattributes → mustBe* validators, repeating args, name-value forwarding) → hand off to matlab-validate-function-arguments| Topic | Recommendation | Since | Category | Rationale |
|---|---|---|---|---|
csvread / dlmread | readmatrix | R2019a | File I/O | |
csvwrite / dlmwrite | writematrix | R2019a | File I/O | |
xlsread | readtable, readmatrix | R2019a | File I/O | |
xlswrite | writetable, writematrix | R2019a | File I/O | |
datenum / datestr / now | datetime (use string/char to format) | R2022b | Date/Time (Not recommended) | Flagged by Code Analyzer |
Next to this one in the catalogue, plus more from the same author.