求助:此程序无法算出二重以上积分K3,k4,急用,希望给予帮助
下面是我编写的程序,感觉是根据理论进行的,但是只能得到k1,k2,无法算出k3,k4。请大家帮忙看看呀。function sys=chenben(u)
beta=1.554;namda=0.131;gama=0.000652;
syms x y x1 x2 x3 f1 f2 f3 f4 f2_1 f2_2 f3_1 f3_2 f3_3 f4_1 f4_2 f4_3 f4_4 K K1 K2 K3 K31 K4 KK Hx Hy
% tao=68.5+1.16929*x
tao=25;
% F=1-exp((-(namda*(tao^(-gama))*x)))^beta);
Hy=namda*(50^(-gama))*beta*(namda*(50^(-gama))*y)^(beta-1)*exp((-(namda*(50^(-gama))*y)^beta))
Hx=namda*(50^(-gama))*beta*(namda*(50^(-gama))*x)^(beta-1)*exp((-(namda*(50^(-gama))*x)^beta))
f1=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(y-x))^(beta-1)*exp((-(namda*(tao^(-gama))*(y-x))^beta))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f2_1=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(x1-x))^(beta-1)*exp((-(namda*(tao^(-gama))*(x1-x))^beta))
f2_2=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(y-x1))^(beta-1)*exp((-(namda*(tao^(-gama))*(y-x1))^beta))
f2=f2_1*f2_2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f3_1=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(x1-x))^(beta-1)*exp((-(namda*(tao^(-gama))*(x1-x))^beta))
f3_2=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(x2-x1))^(beta-1)*exp((-(namda*(tao^(-gama))*(x2-x1))^beta))
f3_3=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(y-x2))^(beta-1)*exp((-(namda*(tao^(-gama))*(y-x2))^beta))
f3=f3_1*f3_2*f3_3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f4_1=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(x1-x))^(beta-1)*exp((-(namda*(tao^(-gama))*(x1-x))^beta))
f4_2=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(x2-x1))^(beta-1)*exp((-(namda*(tao^(-gama))*(x2-x1))^beta))
f4_3=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(x3-x2))^(beta-1)*exp((-(namda*(tao^(-gama))*(x3-x2))^beta))
f4_4=namda*(tao^(-gama))*beta*(namda*(tao^(-gama))*(y-x3))^(beta-1)*exp((-(namda*(tao^(-gama))*(y-x3))^beta))
f4=f4_1*f4_2*f4_3*f4_4
K1=f1
K2=int(f2,x1,x,y)
K3=int(int(f3,x2,x,x1),x1,x,y)
K4=int(int(int(f4,x3,x,x2),x2,x,x1),x1,x,y)
K=(K1+K2+K3+K4)*Hx
KK=int(K,x,0,y)
y=0.15
sys=vpa(Hy+KK) 程序的输入变量u是什么东西?程序中好像没有用到
程序之所以没有算出k3,k4是因为这两个函数的积分不存在
建议改为数值积分吧,给出数值解来 谢谢happy教授的指导,我再重新看一下程序,有问题的话希望能给予帮助亚。
可以把第一行去掉,但是还是得不出结果亚。happy教授还在线么?
数值积分如何转化呢?难道是把x,y设定具体的值么?现在这两个数的值是未定的。
[ 本帖最后由 ChaChing 于 2010-3-15 15:45 编辑 ] 数值积分一般用quad和quad8 k3,k4积分不存在当然没有结果了
x,y可以给出一系列的值
[ 本帖最后由 ChaChing 于 2010-3-15 15:47 编辑 ] 哦,明白了。但是变成数值积分好像不大容易呀,不是很好编呀。呵呵。教授有什么指导的书么?或者具体的指导建议呀。
威尔布函数是干什么的?
[ 本帖最后由 ChaChing 于 2010-3-15 15:47 编辑 ] 这个看帮助吧,quad等
你说的是不是Weibull分布啊?
[ 本帖最后由 ChaChing 于 2010-3-15 15:47 编辑 ]
页:
[1]