MCPInstall
matlab avatar

matlab-analyze-data

Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, row filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.

Installs
155
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-analyze-data
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads matlab-analyze-data automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

MATLAB Data Analysis

Generate idiomatic MATLAB code for tabular data analysis tasks using tables and timetables.

When to Use

  • Any task involving tabular data: exploring, cleaning, transforming, or aggregating tables
  • Time-series analysis: resampling, synchronizing, trend detection, smoothing
  • Answering questions about data in tables (top-N, filtering, group comparisons)
  • Data cleaning: missing values, outliers, type conversion, normalization

When NOT to Use

  • The task has no data context (no tables, timetables, arrays, or date/time values to work with)
  • The primary goal is visualization or plotting, not data analysis (use matlab-build-chart instead)
  • The task is purely symbolic math, simulation, or app building
  • Reading or writing files — CSV, Excel, Parquet, MAT-file (use matlab-import-export-data instead)
  • Data doesn't fit in memory or requires out-of-core processing (use matlab-choose-big-data-solution instead)
  • Storing or retrieving passwords, tokens, or API keys (use matlab-secure-credentials instead)
  • Data lives in a relational database (use matlab-use-database or matlab-use-duckdb instead)
  • Building an ML training pipeline from labeled signal files (use matlab-prepare-signal-data instead)
  • Training classifiers or comparing ML model accuracy on tabular data (use matlab-classify-tabular-data instead)
  • Engineering or selecting features to optimize a supervised ML model (use matlab-engineer-tabular-features instead)
  • Code migration or replacing deprecated APIs (use matlab-modernize-code instead)

Routing: Read references on all relevant topics

This skill covers core MATLAB functions for tabular, time-series, and array-based data workflows — including numeric arrays, sensor matrices, and gridded data. These functions work natively with table, timetable, and numeric arrays, handle missing data correctly, and are performance-optimized. Prefer the modern functions recommended here (e.g., groupsummary, datetime, fillmissing, smoothdata2) over legacy alternatives (e.g., accumarray, nanmean, datenum). Override only if the user explicitly requests otherwise.

Each section below links to a reference file. ALWAYS read the reference file for every relevant topic before writing code. Reference files contain correct syntax, common pitfalls, and "Avoid" patterns that prevent silent bugs. Skipping the reference risks using a deprecated approach or hitting a known pitfall. After reading, state Reference files read: [list] at the top of your response.

Key Functions — Available From

Most functions in this skill are available in R2023a or earlier. The following require a newer release:

FunctionAvailable FromPurpose
paddata, trimdata, resizeR2023bPad, trim, or resize arrays to target length
smoothdata2R2023bSmooth 2-D gridded data over rectangular windows
kdeR2023bKernel density estimate for univariate data
clipR2024aClamp values to a range
islocalmax2, islocalmin2R2024aDetect local extrema in 2-D gridded data
summary (enhanced)R2024bSupports arrays (numeric, datetime, duration, logical); adds Statistics, DataVariables, Detail name-value args
isapproxR2024bTolerance-aware floating-point comparison (use instead of == for computed values)
isbetween (numeric)R2024bCheck elements within a numeric range
numuniqueR2025aCount distinct values in a variable
allbetweenR2025aValidate all values are within a range
alluniqueR2025aValidate all values are unique

Getting Oriented with Data

When data is already in a workspace variable, start by understanding its structure and contents before writing analysis code.

Topics:

  • Summarizing structure, shape, and variable types
  • Assessing how much data is missing and where
  • Understanding distributions (numeric quartiles, categorical value counts)
  • Finding correlations and relationships between variables
  • Checking for duplicates, unique keys, and cardinality
  • Exploring time range, regularity, and temporal patterns

Functions: summary, head, size, jsonencode, anymissing, allfinite, ismissing, groupcounts, numunique, allunique, kde, corrcoef, pivot, unique, isregular, isuniform, retime

Read: exploration.md


Data Types

Use modern MATLAB types instead of legacy alternatives. Modern types are faster, more readable, and work better with table functions.

Topics:

  • Dates and times (parsing, arithmetic, timezones, extracting year/month/day/hour)
  • Elapsed time and calendar offsets
  • Text data (comparing, searching, splitting, editing strings)
  • Categorical data (ordinal rankings, merging/renaming/reordering levels)

Functions: datetime, dateshift, year, month, day, weekday, quarter, hour, timeofday, ymd, hms, hours, days, minutes, seconds, calmonths, caldays, string, matches, contains, startsWith, extractAfter, extractBefore, replace, erase, strip, split, count, categorical, mergecats, renamecats, removecats, reordercats, countcats

Read: data-types.md


Tables and Timetables

Tables are the primary container for tabular data. Use timetable when the data has timestamps, a time vector, or a known sample rate — it unlocks time-aware operations (automatic spacing-aware smoothing, filling, and resampling).

Topics:

  • Creating and structuring tables (variables vs rows, metadata, properties)
  • Selecting variables by type; dot indexing vs braces vs parentheses
  • Converting variable types after import
  • Working with non-uniformly spaced data (SamplePoints)
  • Resampling, aligning, and synchronizing time series
  • Filtering by date range or time tolerance
  • Converting legacy timeseries objects

Functions: table, timetable, table2timetable, vartype, convertvars, retime, synchronize, lag, timerange, withtol, timeseries2timetable, table2array, array2table

Read: tables-and-timetables.md


Eventtables

Use eventtable when tagging or annotating timetable rows with events, episodes, or phases (sensor anomalies, storms, maintenance windows, alarms). Do NOT add boolean columns, string labels, or categorical state variables to the timetable itself.

Topics:

  • Creating an eventtable from timestamps and labels (instantaneous or interval)
  • Attaching events to a timetable
  • Filtering timetable rows by event properties
  • Extracting events from patterns in data (peaks, threshold crossings)
  • Pushing event data into timetable rows for export or grouping
  • Automatic event overlays in plots

Functions: eventtable, eventfilter, extractevents, syncevents, withtol, stackedplot

Read: eventtables.md


Data Cleaning

Handle missing values and outliers using MATLAB's built-in detection and fill functions. Never compare with == for missing values. Use standardizeMissing to convert sentinel values before filling or removing.

Topics:

  • Detecting missing values (NaN, NaT, missing strings, undefined categoricals)
  • Converting placeholder values ("N/A", -999, "") to standard missing
  • Filling gaps (interpolation, forward-fill, moving window, per-type strategies)
  • Limiting fill across long gaps
  • Skipping missing values in aggregation (mean, std, min, max) — correct calling syntax
  • Detecting, removing, or replacing outliers
  • Checking whether values fall within an expected range; clamping

Functions: ismissing, anymissing, standardizeMissing, fillmissing, rmmissing, isoutlier, rmoutliers, filloutliers, isbetween, allbetween, clip

Read: data-cleaning.md


Data Transformation

Filter, sort, reshape, normalize, bin, join, and manage table variables. Use vectorized operations and built-in functions — not loops over rows or manual if-else chains.

Topics:

  • Filtering rows by condition or value range
  • Sorting and retrieving top/bottom N rows
  • Applying functions across rows or across variables
  • Renaming, reordering, adding, removing, splitting, merging variables
  • Converting types and applying in-place transforms
  • Binning continuous values into categories
  • Normalizing, scaling, z-scoring
  • Reshaping between wide and tall formats (pivot, stack, unstack)
  • Joining/merging tables on key variables

Functions: sortrows, topkrows, rowfun, varfun, convertvars, renamevars, movevars, addvars, removevars, splitvars, mergevars, discretize, normalize, clip, rescale, isapprox, isbetween, pivot, stack, unstack, rows2vars, innerjoin, outerjoin, join

Read: data-transformation.md


Grouping and Aggregation

groupsummary is the go-to for grouped statistics — not findgroups+accumarray or manual loops. Use groupfilter for per-group row filtering, grouptransform for per-group normalization, and pivot for cross-tabulation.

Topics:

  • Computing statistics by group (mean, sum, std, min, max, custom)
  • Binning on the fly (numeric edges, hourly/monthly/seasonal time bins)
  • Handling missing or empty groups
  • Filtering rows based on group-level conditions (e.g., minimum group size)
  • Removing per-group outliers
  • Normalizing within each group (z-score, rescale)
  • Cross-tabulating counts or aggregated values

Functions: groupsummary, groupcounts, groupfilter, grouptransform, pivot, findgroups

Read: grouping-and-aggregation.md


Smoothing, Trends, and Patterns

smoothdata is the unified entry point for smoothing (not smooth, which requires Curve Fitting Toolbox). Use detrend or trenddecomp for trend removal/decomposition, and islocalmax/islocalmin/ischange for pattern detection.

Topics:

  • Smoothing noisy data (moving average, Gaussian, Savitzky-Golay, median)
  • Choosing window size (element count vs duration for time-stamped data)
  • Removing linear or polynomial trends
  • Separating trend from seasonality (seasonal decomposition)
  • Finding peaks, valleys, and local extrema
  • Detecting abrupt changes in mean, variance, or slope
  • Summarizing distributions (bin counts, histograms)

Functions: smoothdata, movmean, movmedian, detrend, trenddecomp, islocalmax, islocalmin, ischange, histcounts, histogram

Read: smoothing-and-trends.md


Array and Grid Data

Use arrays when data is homogeneous numeric AND either naturally 2D/grid, performance-critical, or delivered by upstream tooling. For 2D grids, use dedicated 2D functions — do not loop 1D functions over rows/columns.

Topics:

  • When to stay in arrays vs converting to table
  • Operating along a specific dimension (row-wise vs column-wise)
  • Common pitfalls with dimension arguments in std, var, movstd, movvar
  • Handling NaN in array computations (not automatic)
  • Moving window and cumulative statistics
  • Padding, trimming, or resizing arrays to a target length
  • 2D spatial smoothing, gap filling, and peak detection on grids
  • Grouped operations using a grouping vector

Functions: smoothdata2, fillmissing2, islocalmax2, islocalmin2, paddata, trimdata, resize, mink, maxk, bounds, rms, prctile, quantile, iqr, cumsum, cummax, cummin, cumprod, movmean, movmedian, movsum, movstd, movvar, isuniform, isregular

Read: array-and-grid-data.md


Answering Questions About Data

When the task is answering a specific question about data (top-N, filtering, lookups, comparisons), read the strategies reference to avoid common mistakes with sorting direction, missing data, and value interpretation.

Topics:

  • Finding the highest/lowest/top/bottom N entries
  • Looking up values in one column based on ranking in another
  • Accounting for missing or placeholder values in answers
  • Returning raw data values without substitution or mapping
  • Counting rows that match a condition (exact vs partial text matching)

Functions: topkrows, sortrows, groupsummary, standardizeMissing, isapprox, matches, contains, height, nnz

Read: answering-data-questions.md


Copyright 2026 The MathWorks, Inc.

FAQ

What does the matlab-analyze-data skill do?

Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, row filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.

How do I install matlab-analyze-data?

Run npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-analyze-data in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/matlab-analyze-data/ (personal) or .claude/skills/matlab-analyze-data/ (project).

Which AI agents can use matlab-analyze-data?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is matlab-analyze-data safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains matlab-analyze-data?

It is published by matlab in matlab/matlab-agentic-toolkit. It has 155 recorded installs.

More from matlab/matlab-agentic-toolkit

View all →
matlab avatar

matlab-review-code

matlab/matlab-agentic-toolkit

Review MATLAB code for quality, performance, maintainability, and adherence to MathWorks coding standards. Uses checkmatlabcode and matlabcodingguidelines. Use when reviewing code, checking style, finding code smells, assessing quality, or preparing code for handoff or publication.

matlab avatar

matlab-design-digital-filter

matlab/matlab-agentic-toolkit

Design and validate digital filters in MATLAB. Use when cleaning up noisy signals, removing interference, filtering signals, designing FIR/IIR filters (lowpass/highpass/bandpass/bandstop/notch), or comparing filters in Filter Analyzer.

AI & Agents136 installs
matlab avatar

matlab-modernize-code

matlab/matlab-agentic-toolkit

Modernize removed or discouraged MATLAB functions and patterns. Use when the checkmatlabcode MCP tool reports that a function "is not recommended", "will be removed in a future release", or "has been removed" — at any severity (info, warning, or error) — when migrating legacy code, or when replacing removed or discouraged APIs with current equivalents. Also applies to discouraged patterns Code Analyzer does not flag (containers.Map, bsxfun, str2num, eval, clear all) and to removed or discouraged functions such as trainNetwork, csvread, xlsread, datenum, guide, svmtrain, ltln2val, webmap.

AI & Agents129 installs
matlab avatar

matlab-create-live-script

matlab/matlab-agentic-toolkit

Create, edit, and run plain-text MATLAB live scripts (.m files) with rich text formatting, LaTeX equations, section breaks, and inline figures. Use when generating tutorials, analysis notebooks, reports, documentation, or educational content, when modifying existing live scripts, or when converting existing binary .mlx files to .m for version control. Requires R2025a+.

AI & Agents122 installs
matlab avatar

matlab-agentic-toolkit-setup

matlab/matlab-agentic-toolkit

Install and configure the MATLAB Agentic Toolkit — detect MATLAB, install the MCP server, register with your AI coding agent, and verify the environment. Supports Claude Code, Codex, GitHub Copilot, Amp, and Gemini CLI.

AI & Agents121 installs
matlab avatar

matlab-build-app

matlab/matlab-agentic-toolkit

Build MATLAB apps from requirements to working code. Asks discovery questions (or skips them when the path is known), recommends UIFigure or UIHTML architecture, identifies layout archetype (Dashboard, Explorer, Tabbed, Wizard, Canvas), produces an implementation plan, and executes the build. For UIFigure apps, optionally serializes as App Designer (.mlapp or plain-text .m + .xml). Use when a user wants to build a MATLAB app, create a GUI, make an interactive tool, build a uifigure app, build a uihtml app, build an App Designer app, build a .mlapp app, build a plain-text App Designer app, or asks which approach to use. Also use when user describes spatial layout needs: dashboard, control panel, sidebar, tabs, wizard, stepper, canvas, workspace.

Frontend & Design120 installs

Popular ai & agents skills

View category →
google avatar

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents587.3K installs
google avatar

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents586.1K installs
anthropics avatar

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents438.3K installs
prime-skills avatar

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents412.7K installs
leonxlnx avatar

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401.1K installs
obra avatar

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents268.9K installs