Model is an invalid option for linmod

2 ビュー (過去 30 日間)
John Klueven
John Klueven 2022 年 1 月 12 日
回答済み: Samhitha 2025 年 6 月 16 日
I am trying to linearize simulink model through function linmod. I properly put outport and inport block in the simulink, but I get error when i execute linmod('my_model.slx'). The error says my_model is an invalid option. Don't know where might be the problem, below is the scheme.

回答 (1 件)

Samhitha
Samhitha 2025 年 6 月 16 日
The error "my_model is an invalid option" when calling the linmod('my_model.slx') is most likely due to one of the following issues:
  1. linmod takes only the model’s name, without the .slx or .mdl extension. If your model is named my_model.slx, you should call: linmod('my_model').
  2. linmod requires the model to be loaded or open before linearization. use load_system('my_model') or open_system('my_model').
  3. linmod linearizes around the model's top-level Inport and Outport blocks. Place the Inport and Outport blocks at the top level of the model, not inside subsystems.
For more details, look into following documentation:
Hope this helps!

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by