how to do sensitivity analysis of three variables using MATLAB
40 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Daniel Niu
le 7 Déc 2022
Modifié(e) : Alan Stevens
le 7 Déc 2022
Dear friends,
How to do sensitivity analysis for this formula? There are three variables A, B and C.
Your help would be highly appreciated.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1222377/image.png)
0 commentaires
Réponse acceptée
Alan Stevens
le 7 Déc 2022
Modifié(e) : Alan Stevens
le 7 Déc 2022
Depends what your measure of sensitivity is. One possibility is to do a Monte-Carlo simulation and use the standard error on the mean as the measure. For example:
m = 1000;
Yfn = @(A,B,C) (-1.8*A + 0.025*B + 0.33*C + 0.0025*m)./(1 - 1.13*A + 0.011*B);
% Constraints - assuming the constants A, B and C are uniformly
% distributed between lower and upper limits.
N = 10^6; % Number of trials
A = pi/36 + rand(N,1)*(pi/6 - pi/36);
B = 20 + rand(N,1)*40;
C = 1.6 + rand(N,1)*3.4;
Y = Yfn(A,B,C); % N values of Y
Yav = mean(Y); % average value of Y
sigma = std(Y); % standard deviation
se = sigma/sqrt(N); % standard error
disp(' Yav se')
disp([Yav se])
Or use the standard deviation as the measure.
Or, if you want the sensitivity to each parameter separately, then do the same as the above for each separately keeping the other two fixed at their nominal values.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Financial Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!