MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing.

GPL-3.0Auto-check: notesData & Analytics

Install Matlab

skills CLI
$ npx skills add zLanqing/codex-claude-academic-skills --skill matlab -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zLanqing/codex-claude-academic-skills matlab --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zLanqing/codex-claude-academic-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/scientific-toolkit-skill/references/scientific-skills/matlab .claude/skills/matlab && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
matlab
GitHub stars
4.6k
Used in
9 other repos
Token cost
~2.3k tokens
SKILL.md length
286 words
Files
9 (incl. references)
Skills in repo
17
Repo updated
First seen
Licence
GPL-3.0

At a glance

MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing.

  • Works in 8 steps: Matrix Operations → Linear Algebra → Plotting and Visualization → …
  • Writing MATLAB/Octave scripts for linear algebra
  • SKILL.md covers Quick Start, Core Capabilities, Common Patterns and Reference Files, plus 3 more sections
  • Calls brew and apt; reaches octave.org

What it does

Matlab is an agent skill from zLanqing/codex-claude-academic-skills. 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.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `references/data-import-export.md`, `references/executing-scripts.md` and `references/graphics-visualization.md`). Compatibility notes: Requires either MATLAB or Octave to be installed for testing, but not required for just generating scripts.

It sits in Data & Analytics, covering Statistics and Data analysis. It works with Python. The repository describes itself as: 本仓库包含三个面向学术科研人员的Skills,覆盖从文献阅读、论文写作到科学计算的完整研究工作流。office-academic-skill 负责论文阅读报告与学术 PPT/Word 文档生成;research-writing-skill 提供论文写作、润色与审稿回复辅助;scientific-toolkit-skill 整合 MATLAB/Python… The licence is GPL-3.0.

When your agent uses it

  • Writing MATLAB/Octave scripts for linear algebra
  • Signal processing
  • Image processing
  • Differential equations

Example prompts

  • “/matlab”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Requires either MATLAB or Octave to be installed for testing, but not required for just generating scripts.

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Matrix Operations
  2. Linear Algebra
  3. Plotting and Visualization
  4. Data Import/Export
  5. Control Flow and Functions
  6. Statistics and Data Analysis
  7. Differential Equations
  8. Signal Processing

What it can do on your machine

Read from SKILL.md and the folder at commit 7ed6377. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • brew
    • apt

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • octave.org

    Also links to:

    • mathworks.com
    • docs.octave.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires either MATLAB or Octave to be installed for testing, but not required for just generating scripts.

    From compatibility in the SKILL.md frontmatter.

Context cost

Matlab loads about 2.3k tokens when it runs, and up to ~25k if it reads all its reference files. Until then it costs about 127 tokens; SKILL.md has 286 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~127
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~25k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:31
    sudo apt install octave

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from zLanqing/codex-claude-academic-skills at commit 7ed6377, republished under its GPL-3.0 licence (© zLanqing). 286 words, ~2,305 tokens.

Download SKILL.mdSave it as .claude/skills/matlab/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
matlab
description
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.
compatibility
Requires either MATLAB or Octave to be installed for testing, but not required for just generating scripts.
license
For MATLAB (https://www.mathworks.com/pricing-licensing.html) and for Octave (GNU General Public License version 3)
metadata.skill-author
K-Dense Inc.

MATLAB/Octave Scientific Computing

MATLAB is a numerical computing environment optimized for matrix operations and scientific computing. GNU Octave is a free, open-source alternative with high MATLAB compatibility.

Quick Start

Running MATLAB scripts:

bash
# MATLAB (commercial)
matlab -nodisplay -nosplash -r "run('script.m'); exit;"

# GNU Octave (free, open-source)
octave script.m

Install GNU Octave:

bash
# macOS
brew install octave

# Ubuntu/Debian
sudo apt install octave

# Windows - download from https://octave.org/download

Core Capabilities

1. Matrix Operations

MATLAB operates fundamentally on matrices and arrays:

matlab
% Create matrices
A = [1 2 3; 4 5 6; 7 8 9];  % 3x3 matrix
v = 1:10;                     % Row vector 1 to 10
v = linspace(0, 1, 100);      % 100 points from 0 to 1

% Special matrices
I = eye(3);          % Identity matrix
Z = zeros(3, 4);     % 3x4 zero matrix
O = ones(2, 3);      % 2x3 ones matrix
R = rand(3, 3);      % Random uniform
N = randn(3, 3);     % Random normal

% Matrix operations
B = A';              % Transpose
C = A * B;           % Matrix multiplication
D = A .* B;          % Element-wise multiplication
E = A \ b;           % Solve linear system Ax = b
F = inv(A);          % Matrix inverse

For complete matrix operations, see references/matrices-arrays.md.

2. Linear Algebra
matlab
% Eigenvalues and eigenvectors
[V, D] = eig(A);     % V: eigenvectors, D: diagonal eigenvalues

% Singular value decomposition
[U, S, V] = svd(A);

% Matrix decompositions
[L, U] = lu(A);      % LU decomposition
[Q, R] = qr(A);      % QR decomposition
R = chol(A);         % Cholesky (symmetric positive definite)

% Solve linear systems
x = A \ b;           % Preferred method
x = linsolve(A, b);  % With options
x = inv(A) * b;      % Less efficient

For comprehensive linear algebra, see references/mathematics.md.

3. Plotting and Visualization
matlab
% 2D Plots
x = 0:0.1:2*pi;
y = sin(x);
plot(x, y, 'b-', 'LineWidth', 2);
xlabel('x'); ylabel('sin(x)');
title('Sine Wave');
grid on;

% Multiple plots
hold on;
plot(x, cos(x), 'r--');
legend('sin', 'cos');
hold off;

% 3D Surface
[X, Y] = meshgrid(-2:0.1:2, -2:0.1:2);
Z = X.^2 + Y.^2;
surf(X, Y, Z);
colorbar;

% Save figures
saveas(gcf, 'plot.png');
print('-dpdf', 'plot.pdf');

For complete visualization guide, see references/graphics-visualization.md.

4. Data Import/Export
matlab
% Read tabular data
T = readtable('data.csv');
M = readmatrix('data.csv');

% Write data
writetable(T, 'output.csv');
writematrix(M, 'output.csv');

% MAT files (MATLAB native)
save('data.mat', 'A', 'B', 'C');  % Save variables
load('data.mat');                   % Load all
S = load('data.mat', 'A');         % Load specific

% Images
img = imread('image.png');
imwrite(img, 'output.jpg');

For complete I/O guide, see references/data-import-export.md.

5. Control Flow and Functions
matlab
% Conditionals
if x > 0
    disp('positive');
elseif x < 0
    disp('negative');
else
    disp('zero');
end

% Loops
for i = 1:10
    disp(i);
end

while x > 0
    x = x - 1;
end

% Functions (in separate .m file or same file)
function y = myfunction(x, n)
    y = x.^n;
end

% Anonymous functions
f = @(x) x.^2 + 2*x + 1;
result = f(5);  % 36

For complete programming guide, see references/programming.md.

6. Statistics and Data Analysis
matlab
% Descriptive statistics
m = mean(data);
s = std(data);
v = var(data);
med = median(data);
[minVal, minIdx] = min(data);
[maxVal, maxIdx] = max(data);

% Correlation
R = corrcoef(X, Y);
C = cov(X, Y);

% Linear regression
p = polyfit(x, y, 1);  % Linear fit
y_fit = polyval(p, x);

% Moving statistics
y_smooth = movmean(y, 5);  % 5-point moving average

For statistics reference, see references/mathematics.md.

7. Differential Equations
matlab
% ODE solving
% dy/dt = -2y, y(0) = 1
f = @(t, y) -2*y;
[t, y] = ode45(f, [0 5], 1);
plot(t, y);

% Higher-order: y'' + 2y' + y = 0
% Convert to system: y1' = y2, y2' = -2*y2 - y1
f = @(t, y) [y(2); -2*y(2) - y(1)];
[t, y] = ode45(f, [0 10], [1; 0]);

For ODE solvers guide, see references/mathematics.md.

8. Signal Processing
matlab
% FFT
Y = fft(signal);
f = (0:length(Y)-1) * fs / length(Y);
plot(f, abs(Y));

% Filtering
b = fir1(50, 0.3);           % FIR filter design
y_filtered = filter(b, 1, signal);

% Convolution
y = conv(x, h, 'same');

For signal processing, see references/mathematics.md.

Common Patterns

Pattern 1: Data Analysis Pipeline
matlab
% Load data
data = readtable('experiment.csv');

% Clean data
data = rmmissing(data);  % Remove missing values

% Analyze
grouped = groupsummary(data, 'Category', 'mean', 'Value');

% Visualize
figure;
bar(grouped.Category, grouped.mean_Value);
xlabel('Category'); ylabel('Mean Value');
title('Results by Category');

% Save
writetable(grouped, 'results.csv');
saveas(gcf, 'results.png');
Pattern 2: Numerical Simulation
matlab
% Parameters
L = 1; N = 100; T = 10; dt = 0.01;
x = linspace(0, L, N);
dx = x(2) - x(1);

% Initial condition
u = sin(pi * x);

% Time stepping (heat equation)
for t = 0:dt:T
    u_new = u;
    for i = 2:N-1
        u_new(i) = u(i) + dt/(dx^2) * (u(i+1) - 2*u(i) + u(i-1));
    end
    u = u_new;
end

plot(x, u);
Pattern 3: Batch Processing
matlab
% Process multiple files
files = dir('data/*.csv');
results = cell(length(files), 1);

for i = 1:length(files)
    data = readtable(fullfile(files(i).folder, files(i).name));
    results{i} = analyze(data);  % Custom analysis function
end

% Combine results
all_results = vertcat(results{:});

Reference Files

GNU Octave Compatibility

GNU Octave is highly compatible with MATLAB. Most scripts work without modification. Key differences:

  • Use # or % for comments (MATLAB only %)
  • Octave allows ++, --, += operators
  • Some toolbox functions unavailable in Octave
  • Use pkg load for Octave packages

For complete compatibility guide, see references/octave-compatibility.md.

Best Practices

  1. Vectorize operations - Avoid loops when possible:

    matlab
    % Slow
    for i = 1:1000
        y(i) = sin(x(i));
    end
    
    % Fast
    y = sin(x);
  2. Preallocate arrays - Avoid growing arrays in loops:

    matlab
    % Slow
    for i = 1:1000
        y(i) = i^2;
    end
    
    % Fast
    y = zeros(1, 1000);
    for i = 1:1000
        y(i) = i^2;
    end
  3. Use appropriate data types - Tables for mixed data, matrices for numeric:

    matlab
    % Numeric data
    M = readmatrix('numbers.csv');
    
    % Mixed data with headers
    T = readtable('mixed.csv');
  4. Comment and document - Use function help:

    matlab
    function y = myfunction(x)
    %MYFUNCTION Brief description
    %   Y = MYFUNCTION(X) detailed description
    %
    %   Example:
    %       y = myfunction(5);
        y = x.^2;
    end

Additional Resources

© zLanqing, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (references) in scientific-toolkit-skill/references/scientific-skills/matlab of zLanqing/codex-claude-academic-skills.

  • SKILL.md
  • references/data-import-export.md
  • references/executing-scripts.md
  • references/graphics-visualization.md
  • references/mathematics.md
  • references/matrices-arrays.md
  • references/octave-compatibility.md
  • references/programming.md
  • references/python-integration.md

Open the folder on GitHubat commit 7ed6377

Used in 9 other repositories

We found 9 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 9 other GitHub owners. This page covers the copy in zLanqing/codex-claude-academic-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Matlab next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Matlab compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Matlab this skillzLanqing/codex-claude-academic-skills4.6k9 repos~2.3kAutomated safety check: NotesGPL-3.0
Meridian MMM Model Buildinggoogle/meridian1.6k—~2.5kAutomated safety check: PassApache-2.0
Statistical Data Analysislingzhi227/agent-research-skills383—~886Automated safety check: PassNone
Code EngineeropenJiuwen-ai/sciencediscovery148—~2.8kAutomated safety check: PassApache-2.0
Q-EDA Exploratory AnalysisTyrealQ/q-skills108—~1.1kAutomated safety check: PassMIT
PyMC Bayesian Modelingdavila7/claude-code-templates32k12 repos~3.9kAutomated safety check: PassMIT

Similar skills

  • Official

    Takes a user through building a Meridian marketing mix model, from loading CSV data and mapping columns to running EDA, fitting and saving the model.

    1.6k GitHub stars~2.5k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Statistical Data Analysis

    lingzhi227/agent-research-skills

    Writes statistical analysis code for experimental data, runs it through a four-round review, and reports effect sizes, p-values and confidence intervals.

    383 GitHub stars~886 tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Code Engineer

    openJiuwen-ai/sciencediscovery

    A skill your agent uses when you need to write and execute Python/R code to process, transform, and analyze data, delivering reproducible computational results with complete code-level methodology…

    148 GitHub stars~2.8k tokensUpdated 5 days ago
    Data & AnalyticsAuto-check passed
  • Runs exploratory data analysis on tabular data after you confirm each column's measurement level, then writes CSV tables and a narrative summary.

    108 GitHub stars~1.1k tokensUpdated 13 days ago
    Data & AnalyticsAuto-check passed
  • PyMC Bayesian Modeling

    davila7/claude-code-templates

    Builds, fits, checks and compares Bayesian models in PyMC, from priors and NUTS sampling to variational inference, LOO and WAIC comparison, and diagnostics.

    32k GitHub starsUsed in 12 repos~3.9k tokens
    Data & AnalyticsAuto-check passed
  • Python Econ Computing

    brycewang-stanford/Auto-Empirical-Research-Skills

    A skill your agent uses when writing Python code for DSGE models, HANK models, numerical economic computation, causal inference, or quantitative economic data analysis

    4.5k GitHub stars~7.9k tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed

More from zLanqing/codex-claude-academic-skills

All 17 skills in this repo
  • Matplotlib

    zLanqing/codex-claude-academic-skills

    Low-level plotting library for full customization. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 17 repos~2.9k tokens
    Auto-check passed
  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 17 repos~3.9k tokens
    Auto-check passed
  • Simpy

    zLanqing/codex-claude-academic-skills

    Process-based discrete-event simulation framework in Python.

    4.6k GitHub starsUsed in 11 repos~3k tokens
    Auto-check passed
  • Networkx

    zLanqing/codex-claude-academic-skills

    Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python.

    4.6k GitHub starsUsed in 16 repos~3.2k tokens
    Auto-check passed
  • Seaborn

    zLanqing/codex-claude-academic-skills

    Statistical visualization with pandas integration. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 16 repos~4.9k tokens
    Auto-check passed
  • Timesfm Forecasting

    zLanqing/codex-claude-academic-skills

    Zero-shot time series forecasting with Google's TimesFM foundation model.

    4.6k GitHub starsUsed in 6 repos~7.5k tokens
    Auto-check: notes

Works with

Questions about Matlab

What does Matlab do?

MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Matlab is an agent skill from zLanqing/codex-claude-academic-skills. MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing.

When should I use Matlab?

Matlab fits situations like: writing MATLAB/Octave scripts for linear algebra; signal processing; image processing; differential equations.

How do I install Matlab in Claude Code?

Run `npx skills add zLanqing/codex-claude-academic-skills --skill matlab -a claude-code`. Or copy the skill folder (scientific-toolkit-skill/references/scientific-skills/matlab in zLanqing/codex-claude-academic-skills) into .claude/skills/matlab in your project. Claude Code loads it when a task matches its description.

How do I install Matlab in Codex?

Run `npx skills add zLanqing/codex-claude-academic-skills --skill matlab -a codex`. Or copy the skill folder (scientific-toolkit-skill/references/scientific-skills/matlab in zLanqing/codex-claude-academic-skills) into .agents/skills/matlab in your project. Codex loads it when a task matches its description.

Can I use Matlab in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zLanqing/codex-claude-academic-skills --skill matlab -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/matlab, .gemini/skills/matlab, .github/skills/matlab and .opencode/skills/matlab in your project.

What does Matlab need to run?

Going by SKILL.md and its folder, Matlab needs the command-line tools its instructions call (brew and apt). Our summary lists: Python 3. Compatibility (from SKILL.md): Requires either MATLAB or Octave to be installed for testing, but not required for just generating scripts..

Does Matlab access the network?

SKILL.md names 3 domains. In commands or code: octave.org; the agent is likely to contact it when it follows the instructions. As links in the text: mathworks.com and docs.octave.org. This is read from the text; nothing was executed.

Is Matlab safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Matlab use?

Matlab is published under the GPL-3.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Matlab use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 23k tokens, read only when the agent opens those files.

What are the alternatives to Matlab?

Skills that share tags, products or a category with Matlab: Meridian MMM Model Building (google/meridian, 1.6k stars), Statistical Data Analysis (lingzhi227/agent-research-skills, 383 stars), Code Engineer (openJiuwen-ai/sciencediscovery, 148 stars) and Q-EDA Exploratory Analysis (TyrealQ/q-skills, 108 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Matlab?

zLanqing (a GitHub user) maintains it in zLanqing/codex-claude-academic-skills, which has 4,578 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on May 14, 2026.

Source: zLanqing/codex-claude-academic-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.