Having multiple doses or variants within a scenario

Hello,
When generating SimBiology scenarios, is it possible for a given scenario to have multiple doses or variants, or must each scenario have at most one dose and at most one variant?
Thank you,
Abed

 채택된 답변

Florian Augustin
Florian Augustin 2026년 1월 22일
Hi Abed,
it is possible to create SimBiology scenarios with multiple doses or variants for each sample. It depends on how you would like to combine the individual doses / variants with other samples. Here is just one example where you can combine doses d1, d2, ... with samples for a model component named "param":
% Assume you have doses d1, d2 and model component named "param".
% Create scenario for doses:
doseScenario = SimBiology.Scenarios("dose 1", d1);
add(doseScenario, "elementwise", "dose 2", d2);
% ... add other doses
% Create scenario for model component "param" with uniformly distributed values between [1,2]:
uDist = makedist("uniform", "Lower", 1, "Upper", 2);
sObj = SimBiology.Scenarios("param", uDist, "Number", 5);
% Specify random seed if samples need to be reproducible: sObj.RandomSeed = 0;
% ... add more samples for other model states as needed
% Combine dose samples with parameter samples:
add(sObj, "cartesian", doseScenario);
% Display combined scenario
disp(sObj)
% Generate samples:
generate(sObj)
Let me know if you have a particular combination type you need. We should be able to create a SimBiology scenarios object to create samples for your use case.
I hope this helps.
-Forian

댓글 수: 3

Thank you, Florian! I'm able to follow your response and it makes sense to me now.
Does this same approach work in the SimBiology Model Analyzer app?
Hello Hans,
yes, this also works in SimBiology Model Analyzer. When you open a Generate Samples program or a Run Scan program, you can define SimBiology scenarios in the GENERATE SAMPLES section as PARAMETER SETs. Create one parameter set for the doses with Parameter Combination "elementwise" and another parameter set for the model component values. Then combine the two parameter sets by specifying a "cartesian" combination (which is already the default) of the two sets by clicking on the icon in the Combination column of the table in section PARAMETER SET COMBINATIONS.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  SimBiology Community

카테고리

도움말 센터File Exchange에서 Scan Parameter Ranges에 대해 자세히 알아보기

제품

릴리스

R2025b

질문:

2026년 1월 22일

댓글:

2026년 1월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by