Provides computational support for MATLAB and GNU Octave numerical analysis scripts.

Install

mkdir -p .claude/skills/matlab && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4457" && unzip -o skill.zip -d .claude/skills/matlab && rm skill.zip

Installs to .claude/skills/matlab

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.
501 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Perform matrix and linear algebra operations
  • Execute signal and image processing tasks
  • Solve differential equations
  • Generate 2D and 3D scientific visualizations
  • Convert between MATLAB and Python code

How it works

The skill generates and executes scripts using either the commercial MATLAB environment or the open-source GNU Octave interpreter.

Inputs & outputs

You give it
Mathematical problem or data file
You get back
Computed results or visualization plots

When to use matlab

  • Writing linear algebra scripts
  • Performing signal processing analysis
  • Visualizing scientific datasets

About this skill

MATLAB and GNU Octave

Use this skill to design or review numerical code, migrate MATLAB releases, prepare reproducible projects, and plan trusted execution. MATLAB and GNU Octave are distinct products: compatibility is partial, not a license or behavior guarantee.

Product and license gate

  • MATLAB R2026a is proprietary. Do not assume MATLAB, MATLAB Online, a named toolbox, MATLAB Test, MATLAB Compiler, MATLAB Coder, Parallel Computing Toolbox, or an add-on is installed, licensed, or available to the user.
  • MATLAB Runtime is not MATLAB. It runs compatible applications produced with MATLAB Compiler; it cannot run arbitrary source or host MATLAB Engine for Python. Building artifacts needs the applicable licensed compiler and every product used by the source.
  • GNU Octave 11.3.0 is free software under GPLv3+. Octave packages are not MATLAB toolboxes. Similar names do not imply API, numerical, graphics, or licensing equivalence.
  • Ask which runtime, release, platform, installed products, and license context the user actually has. Treat availability as unknown until confirmed.

See Octave compatibility and execution/product boundaries.

Nonnegotiable safety boundary

Never run an untrusted .m, .mlx, MEX binary, MAT file, project startup or shutdown action, package installer, or generated artifact. Static review does not prove safety.

Treat these as execution or code-loading surfaces:

  • eval, evalin, assignin, text-derived feval, str2func, callbacks, timers, app callbacks, and dynamically modified paths;
  • system, unix, dos, shell escape !, Java, .NET, Python (py.*, pyrun, pyrunfile), MEX, and native libraries;
  • mex, codegen, MATLAB Compiler, build tasks, package/project startup, and generated code;
  • load, object deserialization (loadobj, custom serialization), function handles, Java/System objects, and class code reachable from MAT files.

.mlx is an opaque archive for this toolkit and MEX is native executable code. Do not use Python pickle for exchange. Inspect first, isolate when appropriate, obtain explicit approval, then invoke a user-confirmed executable and license. Bundled scripts are static or dry-run tools: none launches MATLAB, Octave, Python Engine, a compiler, or a subprocess.

Default workflow

  1. Clarify target. Record MATLAB release or Octave version, OS/architecture, base product versus required toolboxes/packages, expected inputs/outputs, numerical tolerances, and whether execution is authorized.
  2. Inventory statically. Scan .m files, opaque artifacts, project paths, required products, and MAT headers before any runtime loads them.
  3. Choose code form. Prefer functions with an arguments block for automation. Use scripts only for controlled orchestration and live scripts for reviewed interactive narratives.
  4. Make semantics explicit. Record shapes, classes, units, missing-value rules, indexing, implicit expansion, RNG algorithm/seed, tolerances, and output formats.
  5. Test without hidden state. Keep fixtures synthetic, paths project-local, graphics deterministic, and tests independent of base-workspace residue.
  6. Plan execution. Generate an argv plan, review startup/path effects and licenses, and launch only after explicit approval outside these helpers.
  7. Capture provenance. Hash named inputs/code and record release, products, RNG policy, tolerances, and command plan without dumping the environment.

Language and data checklist

Scripts, functions, and live scripts

  • Scripts share the caller/base workspace and leave variables behind. Functions have local workspaces and explicit inputs/outputs.
  • Live scripts (.mlx) mix code and rich output but are not plain-text review artifacts. Export reviewed code to .m for static inspection.
  • Avoid clear all, broad addpath(genpath(...)), dependence on pwd, global variables, and silent name shadowing. Use project roots and fullfile.
  • Validate sizes, classes, and values in arguments blocks. Remember that type declarations can convert inputs; validators check without converting.
  • A main function file should match the main function name. Local functions are private to the file; since R2024a they can appear anywhere in a script outside conditional contexts.
function y = scaleSignal(x, options)
arguments
    x (:,1) double {mustBeFinite}
    options.Scale (1,1) double {mustBeFinite, mustBeNonzero} = 1
end
y = x .* options.Scale;
end

Read programming.

Arrays, indexing, and numerics

  • MATLAB uses 1-based, column-major indexing. A(i,j), A(k), A(:,j), A{...}, and A.(name) have different semantics.
  • *, /, \, and ^ are matrix operations; dotted forms are element-wise. Use A\b, not inv(A)*b.
  • Since R2016b, compatible dimensions expand implicitly. Assert intended shape before operations that could accidentally form an outer result.
  • Preallocate when output size is known, but do not vectorize at the cost of huge temporaries or unreadable code. Measure with timeit or the profiler.
  • Compare floating-point results with domain-chosen absolute and relative tolerances, not blanket == or a magic multiple of eps.
  • Pin both random algorithm and seed. Use named RandStream substreams for independent parallel work; do not use time-based rng("shuffle") for a reproducibility claim.

Read arrays and mathematics.

Tables, timetables, and missing values

  • A table has named, equal-height variables that may have different types. T(rows,vars) returns a table; T{rows,vars} extracts contents; T.Var selects one variable.
  • A timetable additionally has row times. Sort, validate time zones and uniqueness, then use retime/synchronize intentionally.
  • Missing sentinels are type-specific: NaN, NaT, <missing>, <undefined>, and empty character vectors. Integer and logical arrays have no standard missing sentinel.
  • Define import options rather than relying on inference for production data. Preserve units, time zones, variable names, encodings, and missing rules.

Read data import/export.

Graphics and export

Use explicit figure/axes handles and tiledlayout; label units; set limits, color scales, font sizes, and colormaps deliberately. Prefer exportgraphics over saveas for publication output. In R2026a it exports raster, PDF/EPS/EMF, SVG, GIF, and interactive HTML; format capabilities differ. Specify ContentType="vector" for suitable PDF/SVG-style output and Resolution for raster output. Review accessibility and embedded-raster behavior.

Read graphics and export.

MAT files and exchange

  • Version 7 is the normal save default; matfile creates 7.3 by default. Versions 4/6/7/7.3 differ in types, compression, and per-variable limits.
  • Version 7.3 is HDF5-based, not an arbitrary HDF5 interchange contract. Partial access and chunking can help large arrays.
  • Never load an untrusted MAT file. Inventory headers/datasets first. Objects can invoke class deserialization behavior; opaque/function/native content requires escalation.
  • Prefer CSV/JSON/Parquet/HDF5 with a documented schema for simple exchange. Do not rename pickle payloads as MAT files and do not deserialize pickle.

Read data import/export.

Projects, analysis, and tests

  • Use MATLAB Projects for controlled paths, startup/shutdown tasks, dependencies, source control, and reproducible entry points. Review project actions before opening an untrusted project.
  • matlab.codetools.requiredFilesAndProducts and Dependency Analyzer are static approximations; dynamic dispatch can cause misses or false positives. A required-product report does not prove a license is available.
  • Use Code Analyzer (codeIssues; legacy text workflows can use checkcode) and codeCompatibilityReport before migration.
  • Base MATLAB includes script-, function-, and class-based matlab.unittest workflows. Parallel runs require Parallel Computing Toolbox. Dependency-based selection, richer quality dashboards, generated tests, and advanced coverage/equivalence features can require MATLAB Test or other products.
  • R2026a runtests automatically opens and later closes a project when target tests belong to a project that is not already open. Account for startup and shutdown actions before using this behavior.

Read programming and execution/testing.

Python integration, pinned to R2026a

  • R2026a supports 64-bit CPython 3.9-3.13 for MATLAB Interface to Python, MATLAB Engine for Python, and MATLAB Compiler SDK for Python.
  • The current R2026a PyPI package reviewed here is matlabengine==26.1.12 (released 2026-05-08). It requires an installed R2026a; MATLAB Runtime alone is insufficient. R2026a also ships a preinstalled Engine distribution under one named matlabroot path.
  • Package installation does not grant MATLAB or toolbox licenses. Configure one named interpreter/executable; do not print the full environment, PATH, PYTHONPATH, or credentials.
  • pyenv controls MATLAB-to-Python interpreter selection. In-process Python generally requires restarting MATLAB to switch; out-of-process Python can be terminated and reconfigured.
  • Starting Engine is an explicit execution action: matlab.engine.start_matlab() starts a MATLAB process and can check out a license. Never call it merely to probe availability.
  • Verify conversion semantics for NumPy arrays, pandas DataFrames, tables/timetables, strings/missing values, datetime/duration, dictionaries, shape/order, a

Content truncated.

When not to use it

  • When performing general-purpose web application development

Prerequisites

MATLAB or GNU Octave

Limitations

  • Some toolbox functions are unavailable in GNU Octave

How it compares

It provides specialized syntax and optimized functions for matrix-based numerical computing that are not native to general-purpose languages.

Compared to similar skills

matlab side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
matlab (this skill)22moReviewIntermediate
data-storytelling472moNo flagsIntermediate
csv-data-summarizer1510moReviewBeginner
umap-learn62moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by K-Dense-AI

View all by K-Dense-AI

literature-review

K-Dense-AI

Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).

5591,298

markitdown

K-Dense-AI

Convert various file formats (PDF, Office documents, images, audio, web content, structured data) to Markdown optimized for LLM processing. Use when converting documents to markdown, extracting text from PDFs/Office files, transcribing audio, performing OCR on images, extracting YouTube transcripts, or processing batches of files. Supports 20+ formats including DOCX, XLSX, PPTX, PDF, HTML, EPUB, CSV, JSON, images with OCR, and audio with transcription.

177310

scientific-writing

K-Dense-AI

Write scientific manuscripts. IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), abstracts, for research papers and journal submissions.

94309

exploratory-data-analysis

K-Dense-AI

Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats. This skill should be used when analyzing any scientific data file to understand its structure, content, quality, and characteristics. Automatically detects file type and generates detailed markdown reports with format-specific analysis, quality metrics, and downstream analysis recommendations. Covers chemistry, bioinformatics, microscopy, spectroscopy, proteomics, metabolomics, and general scientific data formats.

15114

infographics

K-Dense-AI

Create professional infographics using Nano Banana Pro AI with smart iterative refinement. Uses Gemini 3 Pro for quality review. Integrates research-lookup and web search for accurate data. Supports 10 infographic types, 8 industry styles, and colorblind-safe palettes.

1141

pptx-posters

K-Dense-AI

Create research posters using HTML/CSS that can be exported to PDF or PPTX. Use this skill ONLY when the user explicitly requests PowerPoint/PPTX poster format. For standard research posters, use latex-posters instead. This skill provides modern web-based poster design with responsive layouts and easy visual integration.

911

Search skills

Search the agent skills registry