Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Writes and runs MATLAB and GNU Octave scripts for linear algebra, signal and image processing, optimization, statistics, and visualization.
Use this skill ↓65% 70%+4 ptsof test cases passed
Passed 16 of 23 test cases with the skill, and 15 of 23 without it.
3 of 3 safety checks passed
28 agent runs
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.
Running MATLAB scripts:
# MATLAB (commercial)
matlab -nodisplay -nosplash -r "run('script.m'); exit;"
# GNU Octave (free, open-source)
octave script.m
Install GNU Octave:
# macOS
brew install octave
# Ubuntu/Debian
sudo apt install octave
# Windows - download from https://octave.org/download
MATLAB operates fundamentally on matrices and arrays:
% 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
Published skills whose descriptions closely match this one, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.