matlab

Write and execute MATLAB and GNU Octave scripts for numerical computing and visualization.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/littlt-momo-c-yfc/skills --skill matlab-littlt-momo-c-yfc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab
Source: https://github.com/littlt-momo-c-yfc/skills/tree/main/skills/scientific-toolkit-skill/references/scientific-skills/matlab
Command: npx skills add https://github.com/littlt-momo-c-yfc/skills --skill matlab-littlt-momo-c-yfc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct MATLAB or GNU Octave code for matrix operations, data analysis, plotting, and simulations requires deep knowledge of syntax, function names, and environment differences, which slows down scientific and engineering work. ## Core Features & Use Cases - Numerical Computing Guidance: Covers matrix operations, linear algebra, ODE solving, optimization, statistics, signal processing, and interpolation with ready-to-use code patterns. - Visualization and Data I/O: Provides 2D/3D plotting, figure export, and file import/export recipes for CSV, Excel, MAT files, and images. - MATLAB/Octave Compatibility: Documents syntax differences and portability rules so scripts run in both MATLAB and the free GNU Octave interpreter. - Use Case: A researcher needs to fit a curve to experimental CSV data, solve a differential equation, and export a publication-quality figure; the Skill supplies the exact commands and script structure to do it. ## Quick Start Ask the assistant to write a MATLAB script that loads your CSV data, fits a polynomial curve, and saves the resulting plot as a PNG file.

Frequently Asked Questions about matlab

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a MATLAB script from the command line?

Use matlab -batch "run('script.m')" for non-interactive execution that returns an exit code. For GNU Octave, run octave --no-gui script.m, or use octave --eval for one-liner commands.

What is the difference between MATLAB and GNU Octave?

GNU Octave is a free, open-source alternative with high MATLAB compatibility for core numerical computing. Differences include Octave-only operators like ++ and +=, missing MATLAB toolboxes, and limited support for Simulink, App Designer, and Live Scripts.

How do I solve differential equations in MATLAB?

Use ode45 for nonstiff ordinary differential equations by defining a function handle for dy/dt and passing a time span and initial conditions. For stiff systems, switch to ode15s or ode23s, and convert higher-order ODEs into first-order systems.

Can MATLAB scripts run in Octave without modification?

Most basic scripts run unchanged, but you should use % for comments, ... for line continuation, end for block terminators, and avoid toolbox-specific functions. Save MAT files with -v7 format for cross-platform compatibility.

How do I export MATLAB figures for publication?

Use exportgraphics(gcf, 'figure.pdf', 'ContentType', 'vector') for vector output or print('-dpng', '-r300', 'figure.png') for 300 DPI raster images. The saveas function also supports PNG, PDF, EPS, and SVG formats.