← ClaudeAtlas

matlab-modernize-codelisted

Modernize deprecated MATLAB functions and patterns. Use when check_matlab_code or checkcode reports "not recommended" or "to be removed" warnings, when migrating legacy code, or when replacing deprecated APIs (trainNetwork, csvread, xlsread, datenum, eval, subplot, guide, optimset, wavread, svmtrain, uicontrol) with current equivalents.
LiHongwei-cn/lihongwei-cn · ★ 9 · AI & Automation · score 79
Install: claude install-skill LiHongwei-cn/lihongwei-cn
# Code Modernization Replace deprecated MATLAB functions and anti-patterns with modern equivalents. This skill is the resolver — `check_matlab_code` is the detector. ## When to Use - `check_matlab_code` or `checkcode` returns "not recommended" or "to be removed" warnings - User asks to modernize, migrate, or update old MATLAB code - Code uses functions listed in the quick reference table below - After static analysis reveals deprecated API usage - Writing new code in a domain that has known deprecated patterns ## When NOT to Use - Reviewing code quality broadly — use `matlab-review-code` (which may then trigger this skill) - Debugging runtime errors — use `matlab-debugging` - Performance profiling — use performance skills (though anti-patterns below overlap) ## Quick Reference: Top Deprecated Functions | Deprecated | Use instead | Since | Category | |------------|------------|-------|----------| | `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` | `datetime` | R2014b | Date/Time | | `subplot` | `tiledlayout` / `nexttile` | R2019b | Graphics | | `eval` / `evalc` / `evalin` | Dynamic field names, function handles | — | Security | | `str2num` | `str2double` | — | Security | | `trainNetwork` | `trainnet` | R2024a | Deep Learning | | `LayerGraph` / `Ser