sensitivity analysis from monte carlo
Hi, i’m trying to reach out for help from anyone expert here. I’m having trouble to run a sensitivity analysis. I have write a script to generate monte carlo uncertainty propogation for 2 paramaters. So, i want to run sensitity analysis from the script. But, i dont know how.
Here is the script. Can anyone help me to generate sensitivity analysis please?
PoissonRatio = 0.348;
diameter = 100;
pi = 3.142;
nsamples = 100000;
for i=1 : nsamples
modulus = 191.6e3+rand(1)*10.1e3;
thickness = 0.5+0.5*rand(1);
Po (i) = (2*pi*50*210.8);
pcr (i) = (2*pi*modulus*thickness^2)/(3*(1-PoissonRatio^2)*0.5);
pRankine (i) = (Po(i)/((Po(i)/pcr(i))+1))/1000;
end
min(pRankine);
max(pRankine);
mean(pRankine);
std(pRankine);
hist(pRankine,100);
% Calculate the mean and standard deviation of the output samples
sample_mean = mean(pRankine);
sample_std = std(pRankine);
% Plot a vertical line at the mean of the output samples
line([sample_mean sample_mean], ylim, ‘LineWidth’, 2, ‘Color’, ‘r’);
% Plot a shaded region around the mean representing one standard deviation
shaded_region = [sample_mean – sample_std, sample_mean + sample_std];
patch([shaded_region(1) shaded_region(1) shaded_region(2) shaded_region(2)], …
[0 max(ylim) max(ylim) 0], ‘r’, ‘FaceAlpha’, 0.2, ‘EdgeColor’, ‘none’);
% Label the plot
xlabel(‘pRankine (kN)’);
ylabel(‘Probability Density’);
title(‘Monte Carlo Uncertainty Propagation’);Hi, i’m trying to reach out for help from anyone expert here. I’m having trouble to run a sensitivity analysis. I have write a script to generate monte carlo uncertainty propogation for 2 paramaters. So, i want to run sensitity analysis from the script. But, i dont know how.
Here is the script. Can anyone help me to generate sensitivity analysis please?
PoissonRatio = 0.348;
diameter = 100;
pi = 3.142;
nsamples = 100000;
for i=1 : nsamples
modulus = 191.6e3+rand(1)*10.1e3;
thickness = 0.5+0.5*rand(1);
Po (i) = (2*pi*50*210.8);
pcr (i) = (2*pi*modulus*thickness^2)/(3*(1-PoissonRatio^2)*0.5);
pRankine (i) = (Po(i)/((Po(i)/pcr(i))+1))/1000;
end
min(pRankine);
max(pRankine);
mean(pRankine);
std(pRankine);
hist(pRankine,100);
% Calculate the mean and standard deviation of the output samples
sample_mean = mean(pRankine);
sample_std = std(pRankine);
% Plot a vertical line at the mean of the output samples
line([sample_mean sample_mean], ylim, ‘LineWidth’, 2, ‘Color’, ‘r’);
% Plot a shaded region around the mean representing one standard deviation
shaded_region = [sample_mean – sample_std, sample_mean + sample_std];
patch([shaded_region(1) shaded_region(1) shaded_region(2) shaded_region(2)], …
[0 max(ylim) max(ylim) 0], ‘r’, ‘FaceAlpha’, 0.2, ‘EdgeColor’, ‘none’);
% Label the plot
xlabel(‘pRankine (kN)’);
ylabel(‘Probability Density’);
title(‘Monte Carlo Uncertainty Propagation’); Hi, i’m trying to reach out for help from anyone expert here. I’m having trouble to run a sensitivity analysis. I have write a script to generate monte carlo uncertainty propogation for 2 paramaters. So, i want to run sensitity analysis from the script. But, i dont know how.
Here is the script. Can anyone help me to generate sensitivity analysis please?
PoissonRatio = 0.348;
diameter = 100;
pi = 3.142;
nsamples = 100000;
for i=1 : nsamples
modulus = 191.6e3+rand(1)*10.1e3;
thickness = 0.5+0.5*rand(1);
Po (i) = (2*pi*50*210.8);
pcr (i) = (2*pi*modulus*thickness^2)/(3*(1-PoissonRatio^2)*0.5);
pRankine (i) = (Po(i)/((Po(i)/pcr(i))+1))/1000;
end
min(pRankine);
max(pRankine);
mean(pRankine);
std(pRankine);
hist(pRankine,100);
% Calculate the mean and standard deviation of the output samples
sample_mean = mean(pRankine);
sample_std = std(pRankine);
% Plot a vertical line at the mean of the output samples
line([sample_mean sample_mean], ylim, ‘LineWidth’, 2, ‘Color’, ‘r’);
% Plot a shaded region around the mean representing one standard deviation
shaded_region = [sample_mean – sample_std, sample_mean + sample_std];
patch([shaded_region(1) shaded_region(1) shaded_region(2) shaded_region(2)], …
[0 max(ylim) max(ylim) 0], ‘r’, ‘FaceAlpha’, 0.2, ‘EdgeColor’, ‘none’);
% Label the plot
xlabel(‘pRankine (kN)’);
ylabel(‘Probability Density’);
title(‘Monte Carlo Uncertainty Propagation’); matlab, sensivity analysis, monte-carlo MATLAB Answers — New Questions