MATLAB带符号计算如何彻底计算clear;clc;syms muG muL muR;G=muG;L=muL;R=muR;a=1.2825/(0.288*muL);b=muL-0.577215/a;cdfL=vpa(exp(-exp(-a*(L-b))));pdfL=vpa(a*exp(-a*(L-b))*cdfL);cdfL=subs(cdfL);sigmaG=muG*0.07sigmaL1=normpdf(norminv(cdfL))/pdfLs

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 02:57:52
MATLAB带符号计算如何彻底计算clear;clc;symsmuGmuLmuR;G=muG;L=muL;R=muR;a=1.2825/(0.288*muL);b=muL-0.577215/a;cdf

MATLAB带符号计算如何彻底计算clear;clc;syms muG muL muR;G=muG;L=muL;R=muR;a=1.2825/(0.288*muL);b=muL-0.577215/a;cdfL=vpa(exp(-exp(-a*(L-b))));pdfL=vpa(a*exp(-a*(L-b))*cdfL);cdfL=subs(cdfL);sigmaG=muG*0.07sigmaL1=normpdf(norminv(cdfL))/pdfLs
MATLAB带符号计算如何彻底计算
clear;clc;
syms muG muL muR;
G=muG;L=muL;R=muR;
a=1.2825/(0.288*muL);b=muL-0.577215/a;
cdfL=vpa(exp(-exp(-a*(L-b))));
pdfL=vpa(a*exp(-a*(L-b))*cdfL);
cdfL=subs(cdfL);
sigmaG=muG*0.07
sigmaL1=normpdf(norminv(cdfL))/pdfL
sigmaR1=vpa(R*(log(1+0.1^2))^0.5)
muG=muR/1.066;
muL=0.1*0.7*muG/1.06;
z=vpa(sqrt(sigmaG^2+sigmaL1^2+sigmaR1^2))
alphaG=(-sigmaG/z)
alphaL=sigmaL1/z
alphaR=sigmaR1/z
计算之后,alphaG、alphaL、alphR的结果都是含有变量的式子,但如果手算的话应该得到具体数值的,请问如何能得到?

MATLAB带符号计算如何彻底计算clear;clc;syms muG muL muR;G=muG;L=muL;R=muR;a=1.2825/(0.288*muL);b=muL-0.577215/a;cdfL=vpa(exp(-exp(-a*(L-b))));pdfL=vpa(a*exp(-a*(L-b))*cdfL);cdfL=subs(cdfL);sigmaG=muG*0.07sigmaL1=normpdf(norminv(cdfL))/pdfLs
直接令muG muL muR 都等于 1 就行了;
调用函数 subs(f, v, 1);
f 是带变量的函数,v 是待替换变量, 1 是替换的值,
一个一个替换一下,
f 的值就出来了,
具体可以参见 MATLAB help 文件