Communitygithub.com

matlab

MATLAB 및 GNU Octave 수치 워크플로우를 빌드, 검토, 마이그레이션 및 안전하게 계획합니다. 배열, 테이블/시계열 데이터, 테스트, 프로젝트, 그래픽, MAT 파일 및 명시적 Python 상호운용성을 지원합니다.

matlab란 무엇인가요?

이 스킬은 AI 에이전트가 MATLAB R2026a 및 GNU Octave 11.3.0과 관련된 모든 작업을 안전하고 정확하게 처리할 수 있도록 설계된 포괄적인 가이드입니다. 사용자는 이 스킬을 통해 수치 코드를 설계하거나 검토하고, MATLAB 릴리즈를 마이그레이션하며, 재현 가능한 프로젝트를 준비하고, 신뢰할 수 있는 실행을 계획할 수 있습니다. 핵심 원칙은 안전 경계로, 신뢰할 수 없는 `.m`, `.mlx`, MEX 바이너리, MAT 파일 등은 절대 실행하지 않으며, 정적 검토만으로는 안전성을 증명할 수 없다고 명시합니다. 주요 기능으로는 프로젝트 매니페스트 검증, MATLAB/Octave argv 명령 계획 생성, Python 호환성 확인 등 네트워크 연결이나 실행 없이 동작하는 다양한 Python CLI 도구를 제공합니다. MATLAB의 독점 라이선스 제약과 GNU Octave의 GPLv3+ 자유 소프트웨어 특성을 명확히 구분하며, Python 통합(`pyenv`, MATLAB Engine for Python)에 대한 세부 정보와 함께 배열, 테이블, 그래픽, MAT 파일 처리, 프로젝트 관리 및 테스트 모범 사례를 언어 및 데이터 체크리스트 형태로 제공합니다. 이 스킬은 MATLAB R2026a 문서와 GNU Octave 11.3.0 공식 문서를 주요 출처로 삼아 최신 정보를 반영합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/matlab

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

MATLAB 및 GNU Octave

이 스킬을 사용하여 수치 코드를 설계하거나 검토하고, MATLAB 릴리즈를 마이그레이션하며, 재현 가능한 프로젝트를 준비하고, 신뢰할 수 있는 실행을 계획하세요. MATLAB과 GNU Octave는 별개의 제품입니다. 호환성은 부분적이며, 라이선스나 동작 보장이 아닙니다.

제품 및 라이선스 게이트

  • MATLAB R2026a는 독점 소프트웨어입니다. MATLAB, MATLAB Online, 특정 툴박스, MATLAB Test, MATLAB Compiler, MATLAB Coder, Parallel Computing Toolbox 또는 애드온이 설치, 라이선스 부여 또는 사용 가능하다고 가정하지 마십시오.
  • MATLAB Runtime은 MATLAB이 아닙니다. MATLAB Compiler로 제작된 호환 애플리케이션을 실행하며, 임의의 소스 코드를 실행하거나 MATLAB Engine for Python을 호스팅할 수 없습니다. 빌드 아티팩트를 생성하려면 해당 라이선스가 있는 컴파일러와 소스에서 사용된 모든 제품이 필요합니다.
  • GNU Octave 11.3.0은 GPLv3+에 따른 자유 소프트웨어입니다. Octave 패키지는 MATLAB 툴박스가 아닙니다. 이름이 유사하다고 해서 API, 수치, 그래픽 또는 라이선스 동등성을 의미하지 않습니다.
  • 사용자가 실제로 보유한 런타임, 릴리즈, 플랫폼, 설치된 제품 및 라이선스 컨텍스트를 물어보세요. 확인될 때까지 가용성을 unknown으로 처리하세요.

Octave 호환성 및 실행/제품 경계를 참조하세요.

불가침 안전 경계

신뢰할 수 없는 .m, .mlx, MEX 바이너리, MAT 파일, 프로젝트 시작/종료 동작, 패키지 설치 프로그램 또는 생성된 아티팩트를 절대 실행하지 마십시오. 정적 검토는 안전성을 증명하지 않습니다.

다음을 실행 또는 코드 로딩 표면으로 취급하세요:

  • eval, evalin, assignin, 텍스트 기반 feval, str2func, 콜백, 타이머, 앱 콜백 및 동적으로 수정된 경로;
  • system, unix, dos, 셸 이스케이프 !, Java, .NET, Python (py.*, pyrun, pyrunfile), MEX 및 네이티브 라이브러리;
  • mex, codegen, MATLAB Compiler, 빌드 태스크, 패키지/프로젝트 시작 및 생성된 코드;
  • load, 객체 역직렬화 (loadobj, 사용자 정의 직렬화), 함수 핸들, Java/System 객체 및 MAT 파일에서 접근 가능한 클래스 코드.

.mlx는 이 툴킷에 대해 불투명한 아카이브이며 MEX는 네이티브 실행 파일입니다. 교환용으로 Python pickle을 사용하지 마십시오. 먼저 검사하고, 적절할 때 격리하며, 명시적 승인을 받은 후 사용자가 확인한 실행 파일 및 라이선스를 호출하세요. 번들된 스크립트는 정적 또는 드라이런 도구입니다. 어떤 것도 MATLAB, Octave, Python Engine, 컴파일러 또는 서브프로세스를 실행하지 않습니다.

기본 워크플로우

  1. 대상 명확히 하기. MATLAB 릴리즈 또는 Octave 버전, OS/아키텍처, 기본 제품 대비 필요한 툴박스/패키지, 예상 입력/출력, 수치 허용 오차 및 실행이 승인되었는지 여부를 기록합니다.
  2. 정적으로 인벤토리화하기. .m 파일, 불투명 아티팩트, 프로젝트 경로, 필요한 제품 및 MAT 헤더를 런타임에 로드하기 전에 스캔합니다.
  3. 코드 형식 선택하기. 자동화를 위해서는 arguments 블록이 있는 함수를 선호합니다. 스크립트는 제어된 오케스트레이션에만 사용하고, 라이브 스크립트는 검토된 대화형 내러티브에 사용합니다.
  4. 의미를 명시적으로 만들기. 형태, 클래스, 단위, 누락 값 규칙, 인덱싱, 암시적 확장, RNG 알고리즘/시드, 허용 오차 및 출력 형식을 기록합니다.
  5. 숨겨진 상태 없이 테스트하기. 픽스처를 합성 상태로 유지하고, 경로를 프로젝트 로컬로 유지하며, 그래픽을 결정론적으로 유지하고, 기본 워크스페이스 잔여물로부터 독립적인 테스트를 유지합니다.
  6. 실행 계획하기. argv 계획을 생성하고, 시작/경로 효과 및 라이선스를 검토하며, 이러한 도우미 외부에서 명시적 승인을 받은 후에만 실행합니다.
  7. 출처 캡처하기. 명명된 입력/코드를 해시하고, 환경을 덤프하지 않고 릴리즈, 제품, RNG 정책, 허용 오차 및 명령 계획을 기록합니다.

언어 및 데이터 체크리스트

스크립트, 함수 및 라이브 스크립트

  • 스크립트는 호출자/기본 워크스페이스를 공유하고 변수를 남깁니다. 함수는 로컬 워크스페이스와 명시적 입력/출력을 가집니다.
  • 라이브 스크립트 (.mlx)는 코드와 풍부한 출력을 혼합하지만, 일반 텍스트 검토 아티팩트가 아닙니다. 정적 검사를 위해 검토된 코드를 .m으로 내보냅니다.
  • clear all, 광범위한 addpath(genpath(...)), pwd 의존성, 전역 변수 및 묵시적 이름 숨기기를 피하세요. 프로젝트 루트와 fullfile을 사용하세요.
  • arguments 블록에서 크기, 클래스 및 값을 검증하세요. 타입 선언이 입력을 변환할 수 있다는 점을 기억하세요. 검증자는 변환 없이 확인합니다.
  • 메인 함수 파일은 메인 함수 이름과 일치해야 합니다. 로컬 함수는 파일에 비공개입니다. R2024a부터 조건부 컨텍스트 외부의 스크립트 어디에나 나타날 수 있습니다.
function y = scaleSignal(x, options)
arguments
    x (:,1) double {mustBeFinite}
    options.Scale (1,1) double {mustBeFinite, mustBeNonzero} = 1
end
y = x .* options.Scale;
end

프로그래밍을 읽어보세요.

배열, 인덱싱 및 수치

  • MATLAB은 1부터 시작하는 열 우선 인덱싱을 사용합니다. A(i,j), A(k), A(:,j), A{...} 및 A.(name)은 서로 다른 의미를 가집니다.
  • *, /, \) 및 ^는 행렬 연산입니다. 점이 있는 형태는 요소별 연산입니다. inv(A)*b 대신 A\b를 사용하세요.
  • R2016b부터 호환되는 차원은 암시적으로 확장됩니다. 의도치 않게 외부 결과를 형성할 수 있는 연산 전에 원하는 형태를 명시하세요.
  • 출력 크기를 알 때는 사전 할당하되, 거대한 임시 변수나 읽기 어려운 코드를 감수하면서 벡터화하지 마세요. timeit 또는 프로파일러로 측정하세요.
  • 부동 소수점 결과를 도메인에 따라 선택된 절대 및 상대 허용 오차와 비교하고, 무분별한 == 또는 eps의 마법 배수를 사용하지 마세요.
  • 난수 알고리즘과 시드를 모두 고정하세요. 독립적인 병렬 작업에는 명명된 RandStream 서브스트림을 사용하고, 재현성 주장을 위해 시간 기반 rng("shuffle")을 사용하지 마세요.

배열 및 수학을 읽어보세요.

테이블, 시간표 및 누락 값

  • table은 이름이 지정된 동일 높이의 변수를 가지며, 각 변수는 다른 유형을 가질 수 있습니다. T(rows,vars)는 테이블을 반환하고, T{rows,vars}는 내용을 추출하며, T.Var는 하나의 변수를 선택합니다.
  • timetable은 추가로 행 시간을 가집니다. 시간대와 고유성을 정렬하고 검증한 후, 의도적으로 retime/synchronize를 사용하세요.
  • 누락 값 센티널은 유형별로 다릅니다: NaN, NaT, <missing>, <undefined> 및 빈 문자 벡터. 정수 및 논리 배열에는 표준 누락 값 센티널이 없습니다.
  • 프로덕션 데이터의 경우 추론에 의존하기보다 가져오기 옵션을 정의하세요. 단위, 시간대, 변수 이름, 인코딩 및 누락 규칙을 유지하세요.

데이터 가져오기/내보내기를 읽어보세요.

그래픽 및 내보내기

명시적인 figure/axes 핸들과 tiledlayout을 사용하세요. 단위에 레이블을 지정하고, 한계, 색상 척도, 글꼴 크기 및 컬러맵을 의도적으로 설정하세요. 출판 출력에는 saveas보다 exportgraphics를 선호하세요. R2026a에서는 래스터, PDF/EPS/EMF, SVG, GIF 및 대화형 HTML을 내보냅니다. 형식별 기능이 다릅니다. 적합한 PDF/SVG 스타일 출력에는 ContentType="vector"를, 래스터 출력에는 Resolution을 지정하세요. 접근성 및 포함된 래스터 동작을 검토하세요.

그래픽 및 내보내기를 읽어보세요.

MAT 파일 및 교환

  • 버전 7은 일반적인 save 기본값입니다. matfile은 기본적으로 7.3을 생성합니다. 버전 4/6/7/7.3은 유형, 압축 및 변수별 한계가 다릅니다.
  • 버전 7.3은 HDF5 기반이지만, 임의의 HDF5 교환 계약이 아닙니다. 부분 접근 및 청킹은 큰 배열에 도움이 될 수 있습니다.
  • 신뢰할 수 없는 MAT 파일을 로드하지 마십시오. 먼저 헤더/데이터셋을 인벤토리화하세요. 객체는 클래스 역직렬화 동작을 호출할 수 있습니다. 불투명/함수/네이티브 콘텐츠는 승격이 필요합니다.
  • 간단한 교환에는 문서화된 스키마와 함께 CSV/JSON/Parquet/HDF5를 선호하세요. pickle 페이로드를 MAT 파일로 이름을 바꾸지 말고, pickle을 역직렬화하지 마세요.

데이터 가져오기/내보내기를 읽어보세요.

프로젝트, 분석 및 테스트

  • 제어된 경로, 시작/종료 작업, 종속성, 소스 제어 및 재현 가능한 진입점을 위해 MATLAB Projects를 사용하세요. 신뢰할 수 없는 프로젝트를 열기 전에 프로젝트 작업을 검토하세요.
  • matlab.codetools.requiredFilesAndProducts 및 Dependency Analyzer는 정적 근사치입니다. 동적 디스패치는 누락 또는 오탐지를 유발할 수 있습니다. 필요한 제품 보고서가 라이선스 가용성을 증명하지는 않습니다.
  • 마이그레이션 전에 Code Analyzer (codeIssues, 레거시 텍스트 워크플로우는 checkcode 사용 가능) 및 codeCompatibilityReport를 사용하세요.
  • 기본 MATLAB에는 스크립트, 함수 및 클래스 기반 matlab.unittest 워크플로우가 포함됩니다. 병렬 실행에는 Parallel Computing Toolbox가 필요합니다. 종속성 기반 선택, 더 풍부한 품질 대시보드, 생성된 테스트 및 고급 커버리지/등가 기능에는 MATLAB Test 또는 다른 제품이 필요할 수 있습니다.
  • R2026a runtests는 대상 테스트가 아직 열려 있지 않은 프로젝트에 속할 때 자동으로 프로젝트를 열고 나중에 닫습니다. 이 동작을 사용하기 전에 시작 및 종료 작업을 고려하세요.

프로그래밍 및 실행/테스트를 읽어보세요.

Python 통합, R2026a 기준

  • R2026a는 MATLAB Interface to Python, MATLAB Engine for Python 및 MATLAB Compiler SDK for Python에 대해 64비트 CPython 3.9-3.13을 지원합니다.
  • 여기서 검토된 현재 R2026a PyPI 패키지는 matlabengine==26.1.12 (2026-05-08 출시)입니다. 설치된 R2026a가 필요하며, MATLAB Runtime만으로는 충분하지 않습니다. R2026a는 또한 matlabroot 경로 아래에 사전 설치된 Engine 배포판을 제공합니다.
  • 패키지 설치는 MATLAB 또는 툴박스 라이선스를 부여하지 않습니다. 하나의 명명된 인터프리터/실행 파일을 구성하세요. 전체 환경, PATH, PYTHONPATH 또는 자격 증명을 출력하지 마십시오.
  • pyenv는 MATLAB-to-Python 인터프리터 선택을 제어합니다. 일반적으로 in-process Python을 전환하려면 MATLAB을 다시 시작해야 합니다. out-of-process Python은 종료 및 재구성할 수 있습니다.
  • Engine 시작은 명시적 실행 동작입니다: matlab.engine.start_matlab()은 MATLAB 프로세스를 시작하고 라이선스를 체크아웃할 수 있습니다. 단순히 가용성을 확인하기 위해 호출하지 마십시오.
  • NumPy 배열, pandas DataFrame, 테이블/시간표, 문자열/누락 값, datetime/duration, 딕셔너리, 형태/순서 및 지원되지 않는 sparse/object/categorical 경우에 대한 변환 의미를 확인하세요.

Python 통합을 읽어보세요.

로컬 도우미 CLI

모든 도우미는 네트워크 미연결, 제한적, 심볼릭 링크 거부 및 비실행입니다. 이 스킬 디렉토리에서 Python 3.11+로 실행하세요. Bash는 이러한 Python CLI 및 검증 명령을 호출하는 데만 허용됩니다. 생성된 MATLAB/Octave argv 계획 또는 신뢰할 수 없는 아티팩트를 실행하는 데 사용하지 마십시오.

도우미목적
scripts/plan_batch_command.py검토된 MATLAB/Octave argv 생성, 실행하지 않음
scripts/scan_m_code.py.m 텍스트를 스캔하고 불투명한 .mlx/MEX 위험을 플래그 지정
scripts/validate_project_manifest.py경로 및 선언된 제품/라이선스 상태 검증
scripts/inventory_mat_file.py헤더/메타데이터 인벤토리, loadmat 호출하지 않음
scripts/plan_python_compatibility.pyR2026a CPython/Engine 호환성 확인
scripts/reproducibility_report.py명명된 로컬 아티팩트를 해시하고 제한된 보고서 생성
scripts/generate_function_scaffold.py드라이런 또는 함수 및 단위 테스트 스캐폴드 생성
python scripts/scan_m_code.py path/to/source --root path/to/project
python scripts/plan_batch_command.py matlab script path/to/main.m --root path/to/project
python scripts/validate_project_manifest.py project-manifest.json --root path/to/project
python scripts/inventory_mat_file.py data.mat --root path/to/project
python scripts/plan_python_compatibility.py --python-version 3.13
python scripts/reproducibility_report.py --root path/to/project --file src/analyze.m
python scripts/generate_function_scaffold.py analyzeSignal --root path/to/project

스캐폴드 생성기는 기본적으로 드라이런입니다. 쓰기에는 --write가 필요하며 충돌을 거부합니다. SciPy 및 h5py는 선택적 인벤토리 백엔드입니다. 승인된 경우 호출자의 프로젝트 잠금 파일에 정확히 검토된 버전을 추가하세요. --help 또는 헤더 전용 인벤토리에는 필요하지 않으며, 이 스킬은 패키지 설치를 수행하지 않습니다.

참고 자료

번들된 JSON 자산은 프로젝트 매니페스트, 재현성 매니페스트 및 R2026a Python 테이블입니다. templates/ 디렉토리는 없으며 assets/에서 Markdown 파일이 로드되지 않습니다. 로컬 링크 테스트는 이 패키지 계약을 적용합니다.

주요 출처 (2026-07-23 확인)

Scientific Agent Skills 인용

이 스킬은 K-Dense의 Scientific Agent Skills의 일부입니다. 이 스킬이 원고, 보고서, 프레젠테이션 또는 코드 릴리즈에 실질적으로 기여한 경우 참고 문헌 또는 소프트웨어 섹션에 논문을 추가하고 사용자에게 알리십시오:

Kassis, T., Agarw...

… [번역을 위해 잘림]

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

alphagenome

Look up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), score variants or scan windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and build Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

analytical-method-validation

Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include

anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

arbor

Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g.

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

autoskill

Observe the user

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

bgpt-paper-search

Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.

bids

>

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and publication figures (scientific-visualization). Use whenever the user has bulk RNA-seq reads or quant output and wants a complete, reproducible differential-expression workflow — e.g.

cellxgene-census

Query the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local single-cell data use scanpy, anndata, or scvi-tools.

cirq

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

citation-management

Comprehensive citation management for academic research. Search OpenAlex, PubMed, and Google Scholar for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.

clinical-decision-support

Prepare and validate research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Use for aggregate or synthetic research documentation and traceability—not patient care or live clinical operation.

clinical-reports

Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports. Use only with synthetic, de-identified, or aggregate inputs and verified source-fact manifests; every output requires qualified review.

관련 스킬