Calculating Senstivities with SimBiology GUI and from 'sbiosimuate' - How do I deal with NaNs and Infs
Afficher commentaires plus anciens
Hi
I am trying to replicate the results of Sensitivity Analysis I get from Simbiology GUI in my script file. The code is written below:
% set the outputs
set(csObj.SensitivityAnalysisOptions, 'Outputs',[s1 s2 s3]);
% set the inputs
set(csObj.SensitivityAnalysisOptions,'Inputs', [k1 k2 k3]);
% Set Normalization
set(csObj.SensitivityAnalysisOptions,'Normalization','Full');
% Enable Sensitivity
set(csObj.SolverOptions, 'SensitivityAnalysis',true);
% accelerate
sbioaccelerate(m);
% Simulate
simDataObj = sbiosimulate(m);
% Get the data
[T, R, snames, ifacs] = getsensmatrix(simDataObj);
The Sensitivity matrix I get ('R') has NaNs and Infs in it, so I convert them to zero and sum across the time axis.
R(isnan(R)) = 0;
R(isinf(R)) = 0;
R = abs(R);
R1 = sum(R,1); % Sum across time
R1 = squeeze(R1); % size of R1 now is states * parameters
And compare the results with the plot obtained from GUI
[Value, Index] = sort(R1(1,:),'descend')
I see that my results are different from those in the GUI, both in terms of values of Sensitivity and order of sensitive parameter.
Can anyone help as to what I am doing wrong here in the normalization of 'R' matrix?
Thanks S N
Réponse acceptée
Plus de réponses (0)
Communautés
Plus de réponses dans SimBiology Community
Catégories
En savoir plus sur Perform Sensitivity Analysis dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!