Use this skill for MATLAB analysis pipelines that start with data and end with validated numbers, figures, or reports.
Workflow
- Inventory input files and schemas before coding.
- Load data with typed APIs:
readtable,readtimetable,matfile,datastore, or toolbox importers. - Normalize units, time zones, missing values, categorical fields, and outliers explicitly.
- Build analysis as functions plus a thin runner script.
- Save clean data, figures, and summary metrics under
artifacts/. - Validate with shape checks, range checks, and at least one numerical assertion.
API Preferences
- Tables and timetables for labeled data.
groupsummary,rowfun,varfun,synchronize, andretimefor structured transformations.fitlm,fitnlm,fitrgp,fitcsvm, orfitcensembleonly after checking toolbox availability.optimproblemor solver APIs for constrained fitting when simple regression is not enough.- Export figures with explicit size, resolution, and format.
Reproducible Figures
Every reproduced paper figure should include:
- Source data provenance.
- Script name and command used.
- Random seed if applicable.
- Axis labels, units, legend, and saved image path.
- A simple metric comparing reproduced result with reference when possible.
Validation
Use checks such as:
assert(height(T) > 0)
assert(all(isfinite(metrics.rmse)))
assert(isfile(fullfile(outDir, "figure_1.png")))
Do not accept a plot as "done" unless the underlying numerical summary also looks sane.