概述
响应面法matlab代码:
muX = [2;4];
sigmaX=[0.4;0.8];
rhoX =[1,0;0,1];
sLn = sqrt(log(1+(sigmaX./muX).^2));
mLn = log(muX)-sLn.^2/2;x = muX;
normX = eps;
n = length(muX);
f = 2;d = diag(f*sigmaX);
gM = 1+(x(1)-1)*x(2);
while abs(norm(x)-normX)/normX > 1e-6
normX = norm(x);
a1 = x'; a2 = a1.*a1;
a3 = repmat(a1,n,1);
a3 = a3-d;
a4 =a3.*a3;
a5 =a3+2*d;
a6 = a5.*a5;
a = [ones(2*n+1,1),[a1,a2;a3,a4;a5,a6]];
163318gv = 1+(a(:,2)-1).*a(:,3);
lambda = agv;
x = muX;
normX1 = eps;
while abs(norm(x)-normX1)/normX1 > 1e-6
normX1 = norm(x);
g = lambda'*[1;x;x.*x];
gX = lambda(2:n+1)+2*lambda(n+2:2*n+1).*x;
cdfX = logncdf(x,mLn,sLn);
pdfX = lognpdf(x,mLn,sLn);
nc = norminv(cdfX);
sigmaX1 = normpdf(nc)./pdfX;muX1 = x-nc.*sigmaX1;
gs =gX.*sigmaX1;
alphaX = -rhoX*gs/sqrt(gs'*rhoX*gs);
bbeta = (g+gX'*(muX1-x))/sqrt(gs'*rhoX*gs);
x = muX1+bbeta*sigmaX1.*alphaX;
end
g = 1+(x(1)-1)*x(2);
x = muX+gM/(gM-g)*(x-muX)
end
JC 法命令流:
muX = [2;4];
sigmaX = [0.4;0.8];
rhoX = [1,0;0,1];
sLn = sqrt(log(1+(sigmaX./muX).^2));
mLn = log(muX)-sLn.^2/2;
muX1 = muX;
sigmaX1 = sigmaX;
x = muX;
normX = eps;
while abs(norm(x)-normX)/normX > 1e-6
normX = norm(x);
g = 1+prod(x)-x(2);
gX = [x(2);x(1)-1];
cdfX = logncdf(x,mLn,sLn);
pdfX = lognpdf(x,mLn,sLn);
nc = norminv(cdfX);
sigmaX1 = normpdf(nc)./pdfX;
muX1 = x-nc.*sigmaX1;
gs = gX.*sigmaX1;
alphaX = -rhoX*gs/sqrt(gs'*rhoX*gs);
bbeta = (g+gX'*(muX1-x))/sqrt(gs'*rhoX*gs);
x = muX1+bbeta*sigmaX1.*alphaX;
end
对 比 两 种 不 同 方 法:
响 应 面 法 计 算 结 果 为:β=4.6900,x*=(7.9722×10-1,4.9315)T,
JC 法计算结果:β=4.6900,由此可知响应面法计算结果精度能够满足要求。
最后
以上就是从容樱桃为你收集整理的基于 MATLAB 计算结构可靠度指标β的结果分析的全部内容,希望文章能够帮你解决基于 MATLAB 计算结构可靠度指标β的结果分析所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复