Is there a possibility to store variant objects in a structure?
3 次查看(过去 30 天)
显示 更早的评论
Dear community,
I need your help again. And it is still about variant subsystems. My model runs perfectly but unfortunately it is very big. Thats why I have a lot of variant objects in the base workspace after simulation. I tried something like that:
The variant Subsystem A needs the variant objects a1, a2 and a3. I generated a structure 'variant_objects' and stored the objects for A in this structure:
variant_objects.a1 = Simulink.Variant('true()');
variant_objects.a2 = Simulink.Variant('false()');
variant_objects.a3 = Simulink.Variant('false()');
The 'Variant choices' table of A looks good. The right subsystem seems active. But when I try to simulate the model I get an error message:
The variant 'variant_objects.a1' of the variant block 'test_Variant/Variant Subsystem' must be the name of a Simulink.Variant object in the base workspace.
Is there a possibility to bundle variant objects in the base workspace? I'm using Matlab 2010b SP1 and have no possibility to switch to another Matlab version.
Thanks for your help!
Bettina
2 个评论
Andrew Waldis
2013-6-19
Hi Bettina,
I'm just wondering if you ever found a solution to this. I am having exactly the same problem with the same version of Matlab you are using. It's frustrating that the parameter dialog box has no problem with the variant objects being in a structure but simulation engine can't deal with it properly.
Thanks,
Andy
Kaustubha Govind
2013-6-19
Bettina/Andrew: I would recommend asking MathWorks Tech Support so the relevant development team can look into this limitation.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Component-Based Modeling 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!