- name
SKILL.md
Файл навыка остаётся в репозитории издателя.
Вставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add matlab/simulink-agentic-toolkit --skill simulink-linearize -a cursor -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add matlab/simulink-agentic-toolkit --skill simulink-linearize -a claude-code -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add matlab/simulink-agentic-toolkit --skill simulink-linearize -a codex -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add matlab/simulink-agentic-toolkit --skill simulink-linearize -a grok -yОтправьте скопированное сообщение в чат Grok Bot. Бот загрузит этот SKILL.md с GitHub и добавит его к навыкам, общим для всех ваших ботов.
Install this skill: https://github.com/matlab/simulink-agentic-toolkit/tree/HEAD/skills-catalog/control-systems/simulink-linearizeОт издателя
Extract linear time invariant (LTI) or linear parameter varying (LPV) models from Simulink using linearize and related APIs from Simulink Control Design.
ssInterpolantsimulink-frequency-response for frestimate-based fallbackThe linearization pipeline has four stages. Not every task requires all stages.
1. Define I/O Points 2. Operating Point → 3. Linearize → 4. Debug
(root level/linio) (findop/operspec) (linearize) (advisor)
Determine I/O points using this decision sequence. Use the first case that applies:
Case A — IO points can be inferred from prompt or model context:
Use the first sub-case that matches:
User specifies explicit I/O signals or blocks (e.g., "from r to y") → define linio points. All linio points must reference a block's output port. If a candidate block has no output ports (Outport, Terminator, Scope) → trace upstream to find the source block and port with model_read.
io = [linio(sprintf("%s/InputBlock", mdl), 1, "input"); ...
linio(sprintf("%s/OutputBlock", mdl), 1, "output")];
User targets a specific block or subsystem (e.g., "linearize the Controller") → Use the block path as the io argument signaling linearize to perform open-loop linearization of the block
io = sprintf("%s/Controller", mdl);
Model has existing linearization points → io = getlinio(mdl); — use if non-empty.
Root-level Inport/Outport blocks exist → omit linio. The linearize command will linearize about the model's root-level I/Os. Use model_read at root scope (depth "0") to confirm root-level Inport/Outport blocks exist.
Case B — Cannot determine IO points:
If none of the above apply → do not guess. Ask the user which signals to use as linearization inputs and outputs. Present the available blocks/signals from the model to help them decide.
Block path rules:
sprintf for block names containing special characters (newlines, commas):
blkPath = sprintf("%s/Integrator,\nSecond-Order", mdl);
io = linio(blkPath, 1, "output");
sub.Name = sprintf("%s/My\nBlock",mdl);
sub.Value = replacement_lti;
sys = linearize(mdl, io, sub);
Determine where to linearize. Choose one:
For batch workflows, use copy to create the operating point array:
% assign varied variable to workspace
myvar = 0;
% create base spec
opBase = operspec(mdl);
opBase.States(1).Known = true;
% define param to vary
nPts = 5;
params.Name = "myvar";
params.Value = linspace(-pi, pi, nPts);
for i = nPts:-1:1
opArray(i) = copy(opBase);
opArray(i).States(1).x = params.Value(i);
end
ops = findop(mdl, opArray, params, findopOptions());
sys = linearize(mdl, OPTIONAL_ARGS);
Each input argument to linearize is optional (beside mdl).
sys = linearize(mdl, io, op, params, blocksub, opts);
Multi-rate models default to the LCM sample time. Use the SampleTime option to specify linear model sample time:
opts = linearizeOptions(SampleTime=0);
sys = linearize(mdl, io, opts);
Batch linearization for LPV:
opts = linearizeOptions(BatchConsistency="on", StoreOffsets="system");
sysArray = linearize(mdl, io, ops, params, opts);
lpvSys = ssInterpolant(sysArray);
When StoreOffsets="system", offsets are embedded in each model of the array. Call ssInterpolant(sysArray) with no offset argument.
Define SamplingGrid if one is not generated from linearize (params argument is omitted).
Multiple transfer functions (single compile) with slLinearizer:
sllin = slLinearizer(mdl);
addPoint(sllin, ["r", "y", "e", "u"]);
T = getIOTransfer(sllin, "r", "y");
S = getSensitivity(sllin, "e");
L = getLoopTransfer(sllin, "u", sign);
Use when linearization returns zero gain or unexpected results.
opts = linearizeOptions(StoreAdvisor=true);
[sys, ~, info] = linearize(mdl, io, opts);
advisorResult = advise(info.Advisor);
Always capture the output of advise — calling without an output argument launches the UI.
Inspect problematic blocks:
problematic = find(advisorResult, linqueryHasDiagnostics());
for i = 1:numel(problematic.BlockDiagnostics)
diag = problematic.BlockDiagnostics(i);
fprintf('%s: %s\n', diag.BlockPath, join(string(diag.DiagnosticMessages), newline));
end
Common advisor findings and resolutions:
tfSys = tf(sys); % Transfer function
zpkSys = zpk(sys); % Zero-pole-gain
For LPV models, simulate and compare against Simulink:
[y, t] = lsim(lpvSys, u, tVec, x0, paramTrajectory);
advise() to prevent UI launchcopy(opSpec) for batch operating point arrays, not assignmentBatchConsistency="on" for batch linearization destined for LPVStoreOffsets="system" when building LPV models with ssInterpolantslLinearizer when extracting multiple transfer functions from one modellinio on blocks without output ports (Outport, Terminator, Scope) — trace upstream to find the source blocklinmod, linmod2, linmodv5 or dlinmod — these are legacyCopyright 2026 The MathWorks, Inc.
>
---name: simulink-linearizedescription: >---# skills-catalog/control-systems/simulink-linearize/SKILL.mdFAQ
Скачайте skills-catalog/control-systems/simulink-linearize/SKILL.md у издателя или скопируйте путь и откройте репозиторий. PlugMCP только показывает навык в каталоге и не хранит файл.
Издатель хранит его в https://github.com/matlab/simulink-agentic-toolkit.
Claude, Cursor, Codex и Grok Build могут читать SKILL.md, который вы добавляете из репозитория издателя. Grok Bot устанавливает его, когда вы отправляете в чат ссылку на папку навыка на GitHub.