Variant control 'variant_generation' of variant block
1 次查看(过去 30 天)
显示 更早的评论
Hello , I am encountring this error . Any solution for this? Thanks

0 个评论
回答(1 个)
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';
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!