Ardeshir Goliaei in MATLAB Answers
Last activity on 26 Oct 2018

In my simbiology model, I can assign values to Species from a matlab file using the following syntax: m1.Species(5).InitialAmount = 10.0; The above will assign 10 to the fifth species. How do I assign values using index to parameters? My model has about 14 parameters and once I try to assign a value to the 6th parameter, using following syntax, I get the following error: m1.Parameters(6).Value = 0.01; Index exceeds array bounds. I appreciate your help.
Colin Phipps in MATLAB Answers
Last activity on 19 Oct 2016

Given a Simbioloogy 'model' I can access/get a specific compartment object if I know the numerical index, e.g. model.compartments(2) shows me the 2nd compartment. I can get/set properties from this indexing. Say this compartment is named 'turtle'. Can I get this compartment object from the Name, instead of by index? Something like model.compartments('turtle'), or model.compartments('Name'=='turtle'). although clearly these won't work.