资源简介
sobol灵敏度分析,可以应用于分析产品价格受各个因素影响的占比
代码片段和文件信息
clear all?
clc
hold off
%sample of size N
N=100;
%sample generation
x1=rand(N1)-0.5;
x2=rand(N1)-0.5;
x3=rand(N1)-0.5;
plot(x1x2‘o‘)
hold on
plot(x1x3‘o‘)
%model evaluations
y=4*x1.^2+3*x2+x3;
%set n. of stripes
r=10;
for i=1:r
t=(i-1)/r-0.5;
ind=find(x1t);
condmean1(i)=mean(y(ind));
ind=find(x2t);
condmean2(i)=mean(y(ind));
ind=find(x3
评论
共有 条评论