Hello,
I'm having trouble simultaneously simulating multiple parameterizations of a model using simfunctions and scenarios, in R2019b. Please refer to the example below. Is there a proper way of doing this? I think I could get around this error be inputting all of the parameterizations when calling 'createSimFunction', but this is not possible in my application because I do not know a priori how many different parameterizations I plan to simulate.
Thank you,
Abed
% The following works:
sbioloadproject('insulindemo','m1');variants = getvariant(m1);singleMeal = sbioselect(m1,'Name','Single Meal');sObj = SimBiology.Scenarios;add(sObj,'cartesian','variants',variants);add(sObj,'cartesian','dose',singleMeal);sObj.verify(m1);f = createSimFunction(m1,sObj,{'[Plasma Glu Conc]','[Plasma Ins Conc]'},[]);sd = f(sObj,24);% But the following triggers an error:
nIndivs = 2; % number of parameterizations (let's pretend each individual has different parameterizations -- although in this example they have the same parameterization).
for iEntry = 1:sObj.NumberOfEntries sObj = sObj.updateEntry(iEntry,'Content',repmat(sObj.getEntry(iEntry).Content,nIndivs,1));endsObj.verify(m1);sd2 = f(sObj,24);
Best Answer