Variant control 'variant_generation' of variant block

1 回表示 (過去 30 日間)
Aqarib Hussain
Aqarib Hussain 2023 年 8 月 17 日
回答済み: Fangjun Jiang 2023 年 8 月 17 日
Hello , I am encountring this error . Any solution for this? Thanks

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2023 年 8 月 17 日
The error message is as clear as it gets. Open the example model of the Variant Subsystem block to learn its proper use.
The direct way to resolve your problem could be running the below codes in MATLAB.
MyChoice=1;
variant_generation=Simulink.Variant;
variant_generation.Condition='MyChoice==1';
variant_simulation=Simulink.Variant;
variant_simulation.Condition='MyChoice==2';

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by