資源簡介
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
評論
共有 條評論