Converts double-precision Simulink systems to single precision using DataTypeWorkflow.Single (Fixed-Point Designer). Reduces memory usage for embedded targets. Does NOT convert standalone MATLAB .m code.
Ships in code-generation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
.slx) or subsystem from double-precision to single-precision.m code — use the convertToSingle function with coder.config('single') insteadDataTypeWorkflow.Converter insteadsimulink-optimize-lookup-tables insteadConversionReport = 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")
open_system(modelName), not load_system — the user must see the diagram before/after.save_system on your own — saving destroys the double-precision baseline and blocks meaningful re-runs. Leave the model dirty. This holds even when the user asks you to "make it stick," "persist it," or "do everything end-to-end" — that is not consent to auto-save. In that case, state plainly that you will not save the model yourself, explain that saving overwrites the double-precision baseline, and ask the user to confirm or run save_system themselves. Only persist after the user explicitly confirms saving specifically (not merely a general "do it all" request).convertToSingle; read its results from report.CheckInfo (it is not a separate call)..slx you happen to find in the working directory (an example or fixture file is not the user's intended model). Only run the conversion once the user has named the model.report.VerifyInfo.StowawayDblBlks afterward — remaining stowaway doubles mean the conversion is incomplete. Fix them at the source (retype locked-double blocks, set Stateflow data to single, or widen the SUD scope) and re-run convertToSingle. Do not recommend hand-inserting single(...) casts or Data Type Conversion blocks on the offending signals — that hides the double instead of eliminating it.report = ...;) — don't pollute the base workspace or echo the raw struct.The tool runs check → convert → verify, populating three sub-structs on the report.
| Field | Description |
|---|---|
ready | Logical — true if the system can be converted - only read ConvertInfo/VerifyInfo when this is true. |
err | Error info (empty on success) |
IncompatibleBlks | Cell array of DataTypeWorkflow.Single.Result — blocks not supporting single precision (see block-name note below) |
UnsupportedBlks | Cell array of DataTypeWorkflow.Single.Result — 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 |
How to extract block names from the diagnostic list. IncompatibleBlks, UnsupportedBlks, StowawayDblBlks, and DTLockedDblBlks are cell arrays of DataTypeWorkflow.Single.Result objects — not block-path strings. Get the readable block path from each element's ID via getDisplayName(). Do not call get_param, getfullname, or string() on the elements: that errors with "The first input to get_param must be of type 'double', 'char' or 'cell'.":
for k = 1:numel(report.CheckInfo.IncompatibleBlks)
r = report.CheckInfo.IncompatibleBlks{k};
fprintf(' %s\n', r.ID.getDisplayName()); % e.g. 'myModel/Integrator'
if ~isempty(r.ErrorMsgs)
fprintf(' %s\n', strjoin(string(r.ErrorMsgs), '; '));
end
end
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 |
| 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:
Simulink:Commands:InvSimulinkObjectName); update-diagram failures (DataTypeWorkflow:Single:UpdateDiagramFailed)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.
Copyright 2026 The MathWorks, Inc.
What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/simulink-author-classic-autosar-swcUse this skill when authoring, reworking, or validating a Classic AUTOSAR software component (SWC) in Simulink, including autosar.api mappings, runnables, timing events, sender-receiver ports, client-server operations, IRVs, BSW service callers, and component ARXML updates.
/simulink-configure-code-interfacesUse the skill to control and verify the code interface configuration of your model — how Simulink® model elements are represented in the generated C or C++ code. This includes — (1) specifying names, types (storage classes), and placement of variables that represent model elements (for example, making a model parameter tunable as a global extern variable); (2) specifying names, types, and placement of functions that represent model algorithms; (3) selecting the deployment type (Component, Subcomponent, or Automatic); (4) selecting the interface configuration type (data or service interface); (5) linking a shared Embedded Coder dictionary to a model; (6) creating Embedded Coder dictionary entries and setting their properties; (7) for service interface configuration — specifying service interface definitions, including sender, receiver, client, and server services. Items 1 and 2 can be set per element or as a category-wide default. Item 1 applies to GRT and ERT models; the rest to ERT models only./simulink-configure-model-for-code-generationConfigure Simulink models for Embedded Coder (ERT), Simulink Coder (GRT rapid-prototyping), or AUTOSAR code generation. Use when the user asks to generate embedded C or C++ code, run a full build of a model, produce a code generation report, configure a model for production/ECU deployment or rapid-prototyping code, target ARM or x86 hardware, apply a MISRA C/C++ code-generation profile (ERT/AUTOSAR only, not GRT), or set up GRT, ERT, AUTOSAR, or shared-library targets. Handles target selection, hardware mapping, model hierarchy propagation, and optional support-flag introspection. Do NOT use for GRT shared-library variants (grt_malloc.tlc), DDS, or ROS. Do NOT use for Simulink Real-Time/Speedgoat targets (simulink-configure-real-time-model), Classic AUTOSAR component mapping/ports/runnables/ARXML authoring (simulink-author-classic-autosar-swc), auditing a model against MISRA guidelines (checking-model-compliance), or iterative optimization of existing generated code (simulink-optimizing-embedded-code).
/simulink-customize-a2lCustomize A2L (ASAP2) files generated from Simulink models using coder.asap2 and coder.mapping APIs. Use this skill when adding COMPU_METHODs, creating GROUPs, converting STD_AXIS to COM_AXIS, adding BIT_OPERATIONs, creating VARIANT_CODING, excluding measurements or struct elements, removing DEFAULT_EVENT_LIST, or any A2L customization for calibration tool compatibility (INCA, CANape). Also use when the user mentions ASAP2, ECU calibration data, A2L export.
/simulink-optimizing-embedded-codeRoutes Embedded Coder workflows for Simulink models. Use when asked to optimize or improve generated code, reduce code metrics, author Code Replacement Libraries, or improve Embedded Coder output. Targets: execution time, memory (RAM, ROM, stack), code size, MISRA compliance. Works iteratively with measurement, gating, and rollback. Triggers: optimize generated code, reduce runtime, shrink code size, improve code efficiency, reduce memory, speed up generated code, MISRA compliance, author CRL. CAUTION: Do NOT optimize generated code without this skill — the gating and rollback workflow is essential./slci-compatibility-analysisUse when you need to verify a Simulink model is compatible with SLCI code inspection, or to apply fixes for identified incompatibilities. Checks model configuration, identifies incompatibilities, and explains why each constraint is required for verification. Also invoked by slci-inspection-incompatibility-analysis to fix constraints and obtain compatibility results. Trigger keywords: checkCompatibility, SLCI compatibility, code inspection readiness, Model Advisor compatibility report.
/code-generation:simulink-single-precision-conversionfrom code-generation
npx claudepluginhub matlab/simulink-agentic-toolkit --plugin code-generationOther plugins' skills for the same job