mcpbeat Sign in

Simulink Single Precision Conversion Agent Skill

Converts a double-precision Simulink system or subsystem to single precision using DataTypeWorkflow.Single (Fixed-Point Designer). The single conversion replaces all user-specified double-precision data types, as well as output data types that compile to double precision, with single-precision data types. Use this skill when converting Simulink systems to single precision, reducing memory usage of a Simulink system, optimizing for embedded targets. Do NOT use for standalone MATLAB .m code single conversion.

4k tokens
context cost
the whole folder, loaded on every use
4
files
instructions only
0
copies elsewhere
how many repositories repackaged it
900
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill simulink-single-precision-conversion

The instruction itself

11 sections, as written by the author

Toolbox: Fixed-Point Designer

Function: DataTypeWorkflow.Single.convertToSingle

Converts user-specified double-precision data types — across block settings, Stateflow chart

settings, signal objects, and bus objects — to single precision. **Boolean, built-in integer

(int8, uint8, int16, …), and fixed-point types are left unchanged.**

When to Use

  • Converting a Simulink model (.slx) or subsystem from double-precision to single-precision
  • Reducing memory footprint for embedded hardware with native single-precision support
  • Batch/CI conversions, checking conversion compatibility, or verifying no stowaway doubles remain
  • Summarizing the single conversion compatibility report and conversion result for the user in plain language

When NOT to Use

  • Standalone MATLAB .m code — use the convertToSingle function with coder.config('single') instead
  • Fixed-point data type optimization — use DataTypeWorkflow.Converter instead

Public API

ConversionReport = DataTypeWorkflow.Single.convertToSingle(systemToConvert)
  • systemToConvert (char) — full block path of the loaded model or subsystem (e.g. 'myModel' or 'myModel/Controller').
  • ConversionReport (struct) — compatibility check, converted items, and verification status (see field tables below).

Worked example: openExample("fixedpoint/ConvertSystemToSinglePrecisionExample")

Rules

  • Open with open_system(modelName), not load_system — the user must see the diagram before/after.
  • Never call save_system — saving destroys the double-precision baseline and blocks meaningful re-runs. Leave the model dirty; persist only if the user explicitly asks.
  • The compatibility check runs *inside* convertToSingle; read its results from report.CheckInfo (it is not a separate call).
  • Get the user's explicit consent before converting. If the model path, subsystem, or scope is ambiguous, ask.
  • Always inspect report.VerifyInfo.StowawayDblBlks afterward — remaining stowaway doubles mean the conversion is incomplete.
  • Assign the report to a local variable (report = ...;) — don't pollute the base workspace or echo the raw struct.

Report Structure

The tool runs check → convert → verify, populating three sub-structs on the report.

report.CheckInfo

| Field | Description |

|-------|-------------|

| ready | Logical — true if the system can be converted |

| err | Error info (empty on success) |

| IncompatibleBlks | Blocks not supporting single precision |

| UnsupportedBlks | Blocks unsupported by the conversion tool (with ErrorMsgs) |

| DTLockedDblBlks | Blocks with locked double data types (do not block conversion) |

| StowawayDblBlks | Blocks generating double operations found during the check |

| TLSSettings | Models whose Target Language Standard was updated to C99 |

| DTOSettings | Systems whose Data Type Override was reset |

| SolverSettings | Models whose variable-step solver was changed to fixed-step |

| configSettings | Config params updated (e.g. GenerateComments, ParameterPrecisionLossMsg) |

| memoryUse.BeforeValue | Per-parameter memory table; column RuntimeMemory (bytes) before conversion |

report.ConvertInfo

Records what the converter actually did.

| Field | Description |

|-------|-------------|

| ready | Logical — true if the convert step ran cleanly |

| err | Error info; empty ([]) on success |

| results | Cell array of fxptds.BlockResult — the blocks/signals changed from double to single |

report.VerifyInfo

| Field | Description |

|-------|-------------|

| StowawayDblBlks | Blocks still generating double operations after conversion |

| memoryUse.AfterValue | Per-parameter memory table; column RuntimeMemory (bytes) after conversion |

The check phase validates the Target Language Standard, Data Type Override, incompatible

blocks, stowaway doubles, data-type-locked doubles, and solver settings — and auto-updates

several of them. **The tool handles TLS→C99, DTO cleanup, and solver changes automatically;

you do not need to set these manually.** See references/edge-cases.md

for the full auto-update behavior, error identifiers, and edge cases:

  • Model not loaded / invalid path (Simulink:Commands:InvSimulinkObjectName); update-diagram failures (DataTypeWorkflow:Single:UpdateDiagramFailed)
  • Incompatible blocks (continuous blocks, MATLAB System blocks) and unsupported MATLAB Function Blocks (globals, MCOS classes, Simulink function calls)
  • Auto-updates (TLS, DTO, solver, config), model-reference scope handling, idempotency, and cleanup on model close

Generating the Conversion Report

After convertToSingle returns, summarize the result for the user in plain language — do not

dump the raw struct. Put the exact API call used at the top for traceability.

For the required output sections, empty-report fallback, reporting conventions, and the

Embedded Coder readiness-check follow-up, see references/reporting-format.md.


Prerequisites & Limitations

  • Requires MATLAB, Simulink, and Fixed-Point Designer; the model must be loaded.
  • The conversion engine is a singleton — only one conversion session can be active at a time.
  • MATLAB Function Blocks with complex logic and model references may need individual review — see references/edge-cases.md.

----

Copyright 2026 The MathWorks, Inc.

----

Other skills for the same job

different authors, same section of the catalogue
Internal Comms
by anthropics
vendor ×13

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

6k tokens
Competitive Ads Extractor
by frostant
×10

Extracts and analyzes competitors' ads from ad libraries (Facebook, LinkedIn, etc.) to understand what messaging, problems, and creative approaches are working. Helps inspire and improve your own ad campaigns.

2k tokens
Lead Research Assistant
by frostant
×8

Identifies high-quality leads for your product or service by analyzing your business, searching for target companies, and providing actionable contact strategies. Perfect for sales, business development, and marketing professionals.

2k tokens
Developer Growth Analysis
by frostant
×6

Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.

4k tokens
App Store Optimization
by alirezarezvani
×3

Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store

55k tokens scripts
Deeptools
by christophacham
×3

NGS analysis toolkit. BAM to bigWig conversion, QC (correlation, PCA, fingerprints), heatmaps/profiles (TSS, peaks), for ChIP-seq, RNA-seq, ATAC-seq visualization.

21k tokens scripts
Pymatgen
by christophacham
×3

Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.

26k tokens scripts
Enhance Prompt
by google-labs-code
vendor ×2

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

3k tokens

How to use it

Copy the folder

Take matlab/simulink-single-precision-conversion from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.