matlab-create-experiment

Create Experiment Manager experiments from MATLAB code with hyperparameter sweeps and validation.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-create-experiment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-create-experiment
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/ai-and-statistics/matlab-create-experiment
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-create-experiment

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Setting up a MATLAB Experiment Manager experiment from existing code requires manually restructuring scripts into experiment functions, building hyperparameter tables, and configuring projects, which is error-prone and time-consuming.

Core Features & Use Cases

  • Automatic Experiment Type Classification: Analyzes user code to classify it as general purpose, built-in training (trainnet), or custom training loop, then generates the correct function signature.
  • Hyperparameter Sweep Generation: Infers tunable parameters from hardcoded values and builds the hyperparameter table with suggested value ranges.
  • Tiered Validation: Verifies the generated function exists on path, passes static analysis via checkcode, has the correct signature, and that all params references match the hyperparameter table.
  • Use Case: You have a deep learning training script with a hardcoded learning rate and mini-batch size. This Skill converts it into an Experiment Manager experiment that sweeps those values across trials, creates the project, and opens Experiment Manager ready to run.

Quick Start

Ask your AI agent to create an Experiment Manager experiment from your MATLAB training script that sweeps the learning rate and mini-batch size.

Frequently Asked Questions about matlab-create-experiment

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

FAQPage Schema
How do I create an Experiment Manager experiment from a MATLAB script?

Provide your script or function to the agent, which classifies the experiment type, infers tunable parameters from hardcoded values, and generates the experiment function and hyperparameter table. After you confirm the design, it creates the project files and opens Experiment Manager.

How do I sweep hyperparameters for trainnet training in MATLAB?

The skill generates a setup function returning training data, network, loss function, and options, with swept values exposed through a params struct. Experiment Manager then runs one trial per hyperparameter combination when you click Run.

What MATLAB version is required for Experiment Manager experiment creation?

This skill requires MATLAB R2025a or later, plus the Deep Learning Toolbox. It also depends on the MATLAB MCP Server tools evaluate_matlab_code and check_matlab_code for execution and validation.

Can I use Bayesian optimization with a generated experiment?

The skill creates experiments with the ParamSweep strategy only. To use Bayesian optimization or random sampling, configure the strategy directly in the Experiment Manager app after the experiment is created.

Why does experiment function validation fail after generation?

Validation fails when the function is not on path, checkcode reports errors, the signature does not match the experiment type, or the function references params fields missing from the hyperparameter table. The skill attempts up to two automatic fixes before escalating.

When should I not use this experiment creation skill?

Do not use it to debug an existing experiment, run or resume trials, or edit settings of an experiment already configured in Experiment Manager. It is intended only for creating new experiments from code or problem descriptions.