MATLAB Data Analysis
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, and retime for structured transformations.
fitlm, fitnlm, fitrgp, fitcsvm, or fitcensemble only after checking toolbox availability.
optimproblem or 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.
1---2name: matlab-data-analysis3description: MATLAB R2026a data analysis workflow for tables, timetables, statistics, fitting, optimization-assisted analysis, visualization, report artifacts, and reproducible paper figures. Use whenever the user asks MATLAB to analyze data, plot results, fit models, process CSV/Excel/MAT files, or reproduce figures.4---56# MATLAB Data Analysis78Use this skill for MATLAB analysis pipelines that start with data and end with validated numbers, figures, or reports.910## Workflow11121. Inventory input files and schemas before coding.132. Load data with typed APIs: `readtable`, `readtimetable`, `matfile`, `datastore`, or toolbox importers.143. Normalize units, time zones, missing values, categorical fields, and outliers explicitly.154. Build analysis as functions plus a thin runner script.165. Save clean data, figures, and summary metrics under `artifacts/`.176. Validate with shape checks, range checks, and at least one numerical assertion.1819## API Preferences2021- Tables and timetables for labeled data.22- `groupsummary`, `rowfun`, `varfun`, `synchronize`, and `retime` for structured transformations.23- `fitlm`, `fitnlm`, `fitrgp`, `fitcsvm`, or `fitcensemble` only after checking toolbox availability.24- `optimproblem` or solver APIs for constrained fitting when simple regression is not enough.25- Export figures with explicit size, resolution, and format.2627## Reproducible Figures2829Every reproduced paper figure should include:3031- Source data provenance.32- Script name and command used.33- Random seed if applicable.34- Axis labels, units, legend, and saved image path.35- A simple metric comparing reproduced result with reference when possible.3637## Validation3839Use checks such as:4041```matlab42assert(height(T) > 0)43assert(all(isfinite(metrics.rmse)))44assert(isfile(fullfile(outDir, "figure_1.png")))45```4647Do not accept a plot as "done" unless the underlying numerical summary also looks sane.