Matlab Configure Scope Object
MathWorksOfficialCreated by MathWorks
- Skill
- Tool integration
- Science and research
- BSD-2-Clause
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a strict safety framework for interacting with scope-related objects in MATLAB and Simulink. It prevents system crashes caused by unauthorized access to internal framework objects by enforcing the use of documented public APIs. The skill outlines a mandatory workflow for identifying scope types, verifying property accessibility via public lists, and handling errors such as locked objects or unsupported configurations.
What it does
- Defines a whitelist of safe, documented APIs for scope configuration.
- Provides a step-by-step workflow for accessing Simulink block and MATLAB scope object properties.
- Establishes error handling procedures for locked objects and missing properties.
- Prohibits access to internal Simulink scope namespaces and undocumented class methods.
- Instructs users to use the scope UI when programmatic access is not supported.
- Ensures safe interaction with graphics pipelines and shared state objects.
When to use it
- When configuring properties of Simulink scope blocks or MATLAB scope objects.
- When you need to automate the setup of visualization tools like Spectrum Analyzers or Time Scopes.
- When you encounter errors while attempting to modify scope properties programmatically.
- When you are unsure if a specific scope property is accessible via the public API.
Advantages
- Prevents MATLAB crashes by restricting access to internal, unstable framework objects.
- Ensures consistent and reliable programmatic configuration of visualization tools.
- Provides clear guidance on when to fallback to the scope UI for manual configuration.
- Reduces debugging time by enforcing a structured approach to property discovery and modification.
Usage examples
- “How do I change the sample rate of my Simulink Scope block programmatically?”
- The agent will retrieve the ScopeConfiguration object, list its public properties to verify the sample rate parameter exists, and then apply the change using the documented API.
- “I am getting an error trying to set a property on my dsp.SpectrumAnalyzer object.”
- The agent will check if the object is locked, perform a release if necessary, or verify if the property is public, providing a clear error message if the property is unsupported.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/matlab/matlab-configure-scope-object/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip matlab-configure-scope-object.zip -d .agents/skills
Documentation by MathWorks
Scope Configuration — Safe API Skill
When To Use
This skill is active whenever you interact with properties of any scope-related block or object:
Simulink blocks:
Scope, Floating Scope (Simulink)
Time Scope, Spectrum Analyzer, Array Plot (DSP System Toolbox)
Constellation Diagram, Eye Diagram (Communications Toolbox)
Video Viewer (Computer Vision Toolbox)
Point Cloud Viewer (Point Cloud Toolbox)
Scope Viewer (signal-level viewer)
Range-Time Intensity Scope, Angle-Time Intensity Scope, Doppler-Time Intensity Scope (Phased Array System Toolbox)
MATLAB objects:
timescope(...)spectrumAnalyzer(...)(formerlydsp.SpectrumAnalyzer)dsp.ArrayPlot(...)comm.ConstellationDiagram(...)comm.EyeDiagram(...)phased.IntensityScope(...)phased.RTIScope(...)phased.DTIScope(...)phased.ATIScope(...)phased.RangeDopplerScope(...)phased.RangeAngleScope(...)phased.AngleDopplerScope(...)
When NOT to Use
Configuring non-scope Simulink blocks — standard
get_param/set_paramon blocks like Gain, Sum, or Transfer Function does not carry escalation riskInteracting with scopes without modifying properties — opening, closing, or viewing scopes during simulation
Using other visualization tools such as Simulation Data Inspector
Workflow
Identify scope type — Simulink block or MATLAB object (see "When This Skill Applies").
Get the configuration interface:
Simulink block:
scopeConfig = get_param('model/Block', 'ScopeConfiguration');MATLAB object: use the object directly.
List public properties:
properties(scopeConfig)orproperties(scopeObj).Check the target property exists in the list. If not → Error Handling (property not found).
Set the property via direct assignment.
Handle errors:
Locked object →
release(obj), then set.Format mismatch → one retry with corrected type; for Simulink blocks, try the other access method (
get_param/set_paramvsScopeConfiguration).Still fails → report limitation to user and stop.
Key Functions
| Function / API | Purpose |
|---|---|
get_param(block, 'ScopeConfiguration') | Obtain the documented configuration object for a Simulink scope block |
set_param(block, param, value) | Set a block-level parameter (fallback access method) |
properties(obj) | List public properties — the only way to confirm a property is accessible |
release(obj) | Unlock a locked MATLAB System object before setting non-tunable properties |
CRITICAL SAFETY RULES
Boundary: Only use the documented public API
The ALLOWED actions section below is a complete whitelist. Any approach not listed there is forbidden, including but not limited to:
Do not access internal framework objects. The
Simulink.scopes.*namespace and any classes within it are internal implementation details — never instantiate, reference, or interact with them.Do not use introspection to discover undocumented interfaces. Do not inspect metaclass information, hidden properties, or internal methods on scope objects or their block handles.
Do not bypass the public API via the block object. Scope block handles must only be used with
get_param/set_paramand'ScopeConfiguration'— never retrieve or manipulate the underlying object directly.Do not escalate after failure. If a permitted API call fails and the error is not a simple format or access-method issue, stop. Do not attempt deeper access or introspection. Report the limitation to the user. (Permitted retries are defined in the Error Handling Procedure.)
ALLOWED workflow (complete whitelist):
Follow these steps in order. Do not skip steps or invent alternatives.
For Simulink scope blocks:
Get the documented configuration object:
scopeConfig = get_param('model/Scope', 'ScopeConfiguration');List available public properties:
properties(scopeConfig)Confirm the target property appears in the list. If it does not, go to the Error Handling Procedure — do not attempt to set it.
Read or write the confirmed public property:
value = scopeConfig.PropertyName;scopeConfig.PropertyName = newValue;Use
get_param/set_paramwith documented parameter names:value = get_param('model/Scope', 'ParameterName');set_param('model/Scope', 'ParameterName', value);A property may be accessible through one method but not the other. If one fails, try the other before reporting a limitation.
For MATLAB scope objects:
List available public properties:
properties(scopeObj)Confirm the target property appears in the list. If it does not, go to the Error Handling Procedure — do not attempt to set it.
Read or write the confirmed public property:
scopeObj.PropertyName = newValue;
That is the complete set of permitted operations. Nothing else.
Mapping user requests to property names
When the user's description does not exactly match a property name, map it to the closest matching public property from the properties(...) output. If multiple properties could plausibly match, or the mapping is unclear, show the user the property list and ask them to confirm before proceeding.
Error Handling Procedure
Property not found: When the target property is not listed by properties(...):
Report to the user:
"Programmatic access to [property] is not supported for [scope]. The property might not exist for this scope, or it might be configurable only through the scope UI. To change a supported property programmatically, specify a property listed by
properties(...). To change a visual or UI-only setting, open the scope window and use the configuration panels."Stop. Do not attempt further programmatic solutions for this specific property.
Locked object error: When setting a property fails because the object is locked (error mentions "non-tunable" or "release"):
Call
release(scopeObj)to unlock the object.Set the property.
The next call to
steporobj(data)will re-lock the object.
Format or access-method error: When a confirmed property fails due to a type mismatch, incorrect value format, or method-specific limitation:
One retry is permitted for each of the following:
Correct the value format (e.g., numeric to string) and retry the same method.
For Simulink scope blocks, try the other access method with the same value.
If all retries fail, report the limitation and stop. Do not attempt deeper access or introspection.
MATLAB may expose internal class names in error messages or class() output. Do not use any class names from the Simulink.scopes.* namespace to access scope internals.
Why These Rules Exist
Simulink scope blocks and MATLAB scope objects use web-based viewers backed by internal framework objects that manage graphics pipelines, web sockets, and shared state. Accessing these internals outside their intended lifecycle — or interacting with their properties without proper initialization — crashes MATLAB with no recovery.
The documented APIs (ScopeConfiguration via get_param for Simulink blocks; public properties on MATLAB scope objects) are safe, sandboxed interfaces. Everything outside them is unsafe for programmatic access.
Copyright 2026 The MathWorks, Inc.
Files
- ATTRIBUTION.mdAdded by AutoGineer1.0 KiB
- LICENSELicence file added by AutoGineer1.4 KiB
- SKILL.md7.8 KiB
- manifest.yaml416 B
manifest.yaml
schema-version: 1 license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md scope: cross-product version: "1.0" human-description: Configure properties of scope-related Simulink blocks or MATLAB objects matlab-release: ">=R2021a" required-tools: - evaluate_matlab_code required-skills: [] required-products: - Simulink toolkit: matlab-agentic-toolkit # Copyright 2026 The MathWorks, Inc.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- MathWorks
- Publisher
- MathWorks (Official)
- Source
- matlab/matlab-agentic-toolkit · skills-catalog/signal-processing/matlab-configure-scope-object · commit 2a7f215
- Licence
- BSD 2-Clause License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE.md)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by MathWorks or MathWorks.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download matlab-configure-scope-object.zip