matlab/matlab-agentic-toolkit / skills-catalog/matlab-app-building/matlab-build-app
matlab-build-app
UnverifiedBuild MATLAB apps from requirements to working code. Asks discovery questions (or skips them when the path is known), recommends UIFigure or UIHTML architecture, identifies layout archetype (Dashboard, Explorer, Tabbed, Wizard, Canvas), produces an implementation plan, and executes the build. For UIFigure apps, optionally serializes as App Designer (.mlapp or plain-text .m + .xml). Use when a user wants to build a MATLAB app, create a GUI, make an interactive tool, build a uifigure app, build a uihtml app, build an App Designer app, build a .mlapp app, build a plain-text App Designer app, or asks which approach to use. Also use when user describes spatial layout needs: dashboard, control panel, sidebar, tabs, wizard, stepper, canvas, workspace.
references/timers.md
View on GitHub# Timers in Apps
A `timer` runs periodic work on the **main (UI) thread**. It does NOT run in the
background, so it cannot keep the UI responsive during heavy work — a slow tick
freezes the app exactly like inline code.
> ### STOP — is a timer actually the right tool?
>
> Use a timer only when **ALL** of these are true:
> 1. The work **recurs on a schedule** (not a one-shot computation).
> 2. **Each tick is cheap** — a quick poll/read plus a UI update, nothing that would
> freeze the UI on its own.
> 3. It **must touch UI/graphics on the main thread** (e.g. `plot`, updating components live).
>
> If **ANY** of these is true, use a **background task** instead (`references/background-tasks.md`), not a timer:
> - A single tick does heavy or blocking work (long compute, large I/O, slow processing).
> - It is a one-shot long-running operation (train, export, download, crunch).
> - The goal is "keep the UI responsive during heavy work" — a timer runs on the UI
> thread and cannot do this.
## How to wire one up
Create the timer in the app's startup, and **always stop and delete it on close**.
```matlab
% In startupFcn:
app.PollTimer = timer("ExecutionMode","fixedRate", "Period",5, ...
"BusyMode","queue", "TimerFcn",@app.onTick);
% Start / stop from button callbacks:
start(app.PollTimer);
stop(app.PollTimer);
% Timer callback — keep it cheap; it runs on the UI thread:
function onTick(app, ~, ~)
data = webread("https://example.com/latest.json"); % quick read
plot(app.UIAxes, data.time, data.value, "ob"); % direct UI update
end
% In CloseRequestFcn — stop and delete before the figure is destroyed:
function onClose(app)
stop(app.PollTimer); delete(app.PollTimer);
delete(app);
end
```
Key points:
- `ExecutionMode="fixedRate"` with a `Period` fires on a fixed schedule; `BusyMode="queue"`
defers a tick if the previous one is still running rather than dropping it.
- The `TimerFcn` receives `(src, event)` after the app handle: signature is `onTick(app, ~, ~)`.
- Never delete the timer without stopping it first, and never leave it running after the
app closes.
Copyright 2026 The MathWorks, Inc.
----
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |