How can I create a custom sensitivity analysis for a compartmental model in symbiology?

3 views (last 30 days)
I am trying to run a sensitivity analysis where I vary one parameter for a data set/variants activated by orders of magnitude (say -5 to 5), and obtain the peak value for a species in order to compare the % change from the original (order of magnitude of 0). In principle, it makes sense in my head how to do this, but I don't know how to go about writing a custom code in symbiology.. Any help would strongly be appreciated.
I have a program in symbiology for running multiple data set and single data set simulations, but not sure how to define a custom one like this.

Accepted Answer

Arthur Goldsipe
Arthur Goldsipe on 14 Aug 2025
If I'm correctly understanding what you want to do, it sounds quite similar to what you can do today with global sensitvity analysis (GSA) programs. These programs allow you to specify as "inputs" a range of values to sample, simulate under those conditions, and then analyze how a simulation "output" varies with those "inputs." As of R2025a, SimBiology supports 3 different GSA algorithms, as described here.
If none of these GSA approaches suits your needs, you could write a custom program. If you want to learn how to do that, the easiest solution is probably to adapt the code for your existing program. If you right-click on the program name in the Browser, you can click on "View Program Code..." to get sample code that you can then copy and paste into a Custom Code program, and then edit it further.
  2 Comments
Juan
Juan on 18 Aug 2025
I was hoping to write a custom code, I have a code for simulation but I had used a data set to set up the different cases (variants which run specific simulations), and its proving to be troublesome when it comes to writing a custom code since its not the same set-up. I'm not sure how to do that there
Arthur Goldsipe
Arthur Goldsipe on 18 Aug 2025
If you're having problems writing custom code, this community may be able to help. But we will need you to share more details. The best would be for you to share a project with sample code, so we can see what you've tried and what problem you are running into.

Sign in to comment.

More Answers (0)

Communities

More Answers in the  SimBiology Community

Categories

Find more on Perform Sensitivity Analysis in Help Center and File Exchange

Products


Release

R2025a

Community Treasure Hunt

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

Start Hunting!