各位大神,积分方程组如图所示,求组内参数a和b
尝试代码如下:
LL=1/100000;
UL=1/10000;
eq=@(a,b,x)(b^a/gamma(a))*x^(a-1)*exp(-1*x*b);
eq1=@(a,b)integral(@(x)eq(a,b,x),0,LL)-0.3;
eq2=@(a,b)integral(@(x)eq(a,b,x),0,UL)-0.9;
eq3=@(x)[eq1(x(1),x(2));eq2(x(1),x(2))];
[a,b]=fsolve(eq3,[0.1;6000])
运行程序后显示:
出错 tt (line 11)
[a,b]=fsolve(eq3,[0.1;6000])
原因:
Failure in initial objective function evaluation. FSOLVE cannot continue.
但是无论我怎么更改初值,都是报错,求大神们支招,谢谢!

 Accepted Answer

0 votes

fun=@(x)[gamcdf(1e-5,x(1),x(2))-0.3;gamcdf(1e-4,x(1),x(2))-0.9];
ab=fsolve(fun,[0.5 1e-3]);
a=ab(1)
a =0.7088
b=1/ab(2)
b =1.7739e+04

More Answers (0)

Categories

Find more on 启动和关闭 in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!