matlab
하는 일
이 스킬은 수치 계산용 MATLAB과 Octave 코드를 작성하고 고치는 방법을 에이전트에게 가르칩니다. 행렬 연산, 데이터 분석, 과학 그래프를 다룹니다.
사용하는 경우
- ✓선형대수나 신호 처리를 위한 MATLAB 또는 Octave 스크립트가 필요할 때.
- ✓MATLAB 문법이나 특정 함수에 도움이 필요할 때.
- ✓MATLAB과 Octave 사이에서 코드를 변환하고 싶을 때.
스킬 링크
https://github.com/zLanqing/codex-claude-academic-skills/blob/main/scientific-toolkit-skill/references/scientific-skills/matlab/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 선형 시스템을 풀고 결과를 그래프로 그리는 MATLAB 스크립트를 작성해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 MATLAB 또는 Octave 문법과 내장 함수를 사용해 스크립트를 작성하거나, 실행하거나, 고칩니다. 스크립트는 matlab 또는 octave 명령으로 터미널에서 실행할 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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:
# 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
Core Capabilities
1. Matrix Operations
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
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
% 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
% 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
% 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
% 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
% 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
% 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
% FFT
Y = fft(signal);
f = (0:length(Y)-
자주 묻는 질문
MATLAB을 사지 않고도 실행할 수 있나요?
네. 스킬은 GNU Octave가 호환성이 높은 무료 오픈 소스 대안이라고 설명합니다.
명령줄에서 스크립트를 어떻게 실행하나요?
스킬이 보여 주듯이 스크립트 이름과 함께 matlab 또는 octave 명령을 사용합니다.
그래프 작성도 다루나요?
네. 과학 시각화 작성을 다룹니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 5.6k
- 순위
- #14767
- 라이선스
- MIT
- 업데이트
- 2026. 5. 14.
댓글
- …
이 저장소의 다른 스킬
office-academic-skill
5.6k연구 논문을 Word 보고서로 바꾸고 편집 가능한 중국어 중심 학술 PowerPoint 슬라이드를 만들며, 발표자 노트와 레이아웃 검사를 포함하도록 에이전트를 돕습니다.
research-writing-skill
5.6k연구 논문의 절, 초록, 심사자 답변을 작성하고 수정하며 다듬도록 에이전트를 돕습니다. 수식, 제목, 인용은 주어진 그대로 유지합니다.
scientific-toolkit-skill
5.6k신호 및 이미지 처리, 통계, 시뮬레이션, 출판용 그림을 위한 MATLAB 또는 Python 과학 코드를 작성하고 디버그하도록 에이전트를 돕습니다.
matplotlib
5.6k에이전트가 Python에서 matplotlib로 모든 그래프 요소를 조절한 맞춤 차트를 만들고, 출판 품질의 PNG, PDF, SVG 파일로 내보내도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.