Not finding info on arrays of variant objects
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
The help page on variant objects advises that the "active" property of variants is being deprecated: "The Active property of the Variant object will be removed in a future release. Explicitly specify a variant or an array of variants as an input argument when you simulate a model using sbiosimulate". I think multiple, layered variants is a good idea. But nowhere in the documentation can I find an example of a variant array. Is there a scripted example? Specifically, is there an example of a sbiosimulate using an array of variants?
Or, could somebody share a snippet of code that shows how a couple of variants can be used? As simple as {var1, var2} or [var1 var2] in the variant object space in sbiosimulate? These didn't seem to work for me.
How do you construct an array of variants specified in the documentation above. Must one create a new variant, or can I specify a list somehow?
Thanks!
0 commentaires
Réponses (1)
Arthur Goldsipe
le 4 Sep 2018
Hi Jim,
Sorry this wasn't clear from the documentation. I think [var1 var2] should have worked. Here are some equivalent ways to simulate a model using the 1st and 3rd variant on a model:
allVariants = getvariant(model);
variant1 = allVariants(1);
variant3 = allVariants(3);
variants1and3 = [variant1 variant3];
sd1 = sbiosimulate(model, variants1and3);
sd2 = sbiosimulate(model, [variant1 variant3]);
sd3 = sbiosimulate(model, allVariants([1 3]));
If you're still having problems, can you share some code on how to reproduce whatever error you're getting? Once we figure out where the confusion is, I'll work with our writer to try to clear things up in the documentation.
-Arthur
1 commentaire
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!