What problem does it solve?
MATLAB errors and unexpected behavior are hard to diagnose from reading code alone, especially when failures depend on actual data values, types, or dimensions. This Skill connects an AI agent to a live MATLAB session via MCP tools so it can actively investigate errors, inspect variables, and trace root causes instead of guessing.
Core Features & Use Cases
- Runtime Debugging with Breakpoints: Set breakpoints with dbstop, inspect the call stack with dbstack, navigate frames with dbup/dbdown, and check variable state with whos in desktop mode.
- No-Desktop Safe Diagnostics: Use try-catch wrappers and tracer conditional breakpoints to probe variable values without hanging the MCP session when MATLAB runs without a desktop.
- Common Error Playbooks: Get targeted diagnostic steps for frequent MATLAB errors such as undefined functions, index out of bounds, dimension mismatches, and NaN propagation.
- Use Case: A user reports "Index exceeds array dimensions" in their data processing script. The agent runs the script via run_matlab_file, inspects the failing line's variables, finds an off-by-one index, and verifies the fix by re-running the code.
Quick Start
Ask the agent to investigate why your MATLAB script throws an error and have it inspect the variables on the failing line using the live MATLAB session.