Creating a 3-D bar graph with parameter sensitivities with respect to all model species

5 visualizaciones (últimos 30 días)
I would like to create a 3D bar graph that displays parameter sensitivities for different species in a simbiology model. I tried exporting the simbiology task code to MATLAB but I cannot run the script even after specifying the correct model file. I would like to do this with MATLAB code to create high quality publication figures for the sensitivity analysis. I cannot see any data generated using my code below:
sbioloadproject("GI_model.sbproj");
%v=getvariant(m2);
%set(v(1), 'Active'); %set variant that contains top 5 param.
cs = getconfigset(m4, 'active');
set(cs, 'StopTime', 56);
cs.TimeUnits= ('day');
%mathworks command line
%[t,r,outputFactors,inputFactors] = getsensmatrix(simdata,outputFactorNames,inputFactorNames);
outputNames= ["A", "B", "C", "D", "E", "F", "G", "H", "I"];
inoutNames= ["k1", "k2", "k3", "k4", "k5", "k6", "k7"];
varObj= m4.getvariant;
doseObj=m4.getdose;
simdata= sbiosimulate (m4,[],varObj(3), doseObj(2));
[t,r,outputFactors,inputFactors] = getsensmatrix(simdata,outputNames,inputNames);
Also attached is a figure that I would like to get using my code.
Thanks in advance!

Respuesta aceptada

Arthur Goldsipe
Arthur Goldsipe el 14 de Mzo. de 2022
I'm guessing the configset is not configured for sensitivity analysis. You probably need to do something like the following before calling sbiosimulate:
cs.SolverOptions.SensitivityAnalysis = true;
sensOpts = cs.SensitivityAnalysisOptions;
sensOpts.Outputs = sbioselect(m1, "Name", outputNames);
sensOpts.Inputs = sbioselect(m1, "Name", inputNames);
  10 comentarios
Arthur Goldsipe
Arthur Goldsipe el 16 de Mzo. de 2022
No, it's not currently possible to (directly) do sensitivity analysis on someting determined by a repeated assignment rule like this. The best workaround I've come up with so far is to do sensitivity analysis on x1, x2, and x3. Then, compute the sensitivity of Σx after the simulation as the sum of the relevant sensitivities. Sorry I can't offer anything better.
Fearass Zieneddin
Fearass Zieneddin el 16 de Mzo. de 2022
I think I found the issue in the code: it looks like when using the 'full' or 'half' normalization options the auc matrix returns NaN values. The r(:,i,j) matrix shows some numbers any idea what I am doing wrong here?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Scan Parameter Ranges en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by