Is there a possibility to store variant objects in a structure?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Andrew Waldis
el 19 de Jun. de 2013
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
el 19 de Jun. de 2013
Bettina/Andrew: I would recommend asking MathWorks Tech Support so the relevant development team can look into this limitation.
Respuestas (0)
Ver también
Categorías
Más información sobre Component-Based Modeling en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!