回复 15楼 weilinhy 的帖子
汗! 我可没帮上忙! :@L这些东东不是忘光了, 就是还需再学习! 暂时没有想到更好的办法,不知从解析上能否分析一下这个积分收敛性,如果收敛的话或许可以通过将abs(s1-u1)改为abs(s1-u1)+eps尝试解一下。有时间看看,这两天有点忙 谢谢rocwoods
当H<3/4时,上述积分是收敛的。因为
当H<3/4,上述积分是有限的(将区间分为和)
我现在还有个问题
采用您的方法计算下面积分时候,当H<3/4时候
clear all
theta=1; T=10; H=0.78;
ff1=@(x) @(y,z) exp(-theta*x-theta*(y-z)).*((x-y)).^(2*H-2).*z.^(2*H-2);
ff2=@(x) @(y,z) exp(-theta*x-theta*(y-z)).*((y-x)).^(2*H-2).*z.^(2*H-2);
ff3=@(x) @(y,z) exp(-theta*x-theta*(z-y)).*((x-y)).^(2*H-2).*z.^(2*H-2);
ff4=@(x) @(y,z) exp(-theta*x-theta*(z-y)).*((y-x)).^(2*H-2).*z.^(2*H-2);
Int1 = quadgk(@(x) arrayfun(@(x) quad2d(ff1(x),0,x,0,@(y)y),x),0,T)
Int2 = quadgk(@(x) arrayfun(@(x) quad2d(ff2(x),x,T,0,@(y)y),x),0,T)
Int3 = quadgk(@(x) arrayfun(@(x) quad2d(ff3(x),0,x,@(y)y,T),x),0,T)
Int4 = quadgk(@(x) arrayfun(@(x) quad2d(ff4(x),x,T,@(y)y,T),x),0,T)
INT = Int1+Int2+Int3+Int4
运行后
> In quad2d at 254
In @(x)quad2d(ff1(x),0,x,0,@(y)y)
In @(x)arrayfun(@(x)quad2d(ff1(x),0,x,0,@(y)y),x)
In quadgk>evalFun at 357
In quadgk>f1 at 375
In quadgk>vadapt at 269
In quadgk at 208
Warning: Reached the maximum number of function evaluations (2000). The result fails the global
error test.
请问怎么可以避免这个问题
辛苦您了
[ 本帖最后由 weilinhy 于 2010-6-24 09:23 编辑 ] 楼主你用的MATLAB哪个版本?我用2010a没有提示:
>> clear all
theta=1; T=10; H=0.78;
ff1=@(x) @(y,z) exp(-theta*x-theta*(y-z)).*((x-y)).^(2*H-2).*z.^(2*H-2);
ff2=@(x) @(y,z) exp(-theta*x-theta*(y-z)).*((y-x)).^(2*H-2).*z.^(2*H-2);
ff3=@(x) @(y,z) exp(-theta*x-theta*(z-y)).*((x-y)).^(2*H-2).*z.^(2*H-2);
ff4=@(x) @(y,z) exp(-theta*x-theta*(z-y)).*((y-x)).^(2*H-2).*z.^(2*H-2);
Int1 = quadgk(@(x) arrayfun(@(x) quad2d(ff1(x),0,x,0,@(y)y),x),0,T)
Int2 = quadgk(@(x) arrayfun(@(x) quad2d(ff2(x),x,T,0,@(y)y),x),0,T)
Int3 = quadgk(@(x) arrayfun(@(x) quad2d(ff3(x),0,x,@(y)y,T),x),0,T)
Int4 = quadgk(@(x) arrayfun(@(x) quad2d(ff4(x),x,T,@(y)y,T),x),0,T)
INT = Int1+Int2+Int3+Int4
Int1 =
1.2617
Int2 =
4.1067
Int3 =
1.4130
Int4 =
3.2933
INT =
10.0747
使用2009a试了下roc的编码, 结果同roc
回复 19楼 rocwoods 的帖子
对不起 上面的我写错了 应该是clear all
theta=1; T=10; H=0.68; %H is less than 3/4
ff1=@(x) @(y,z) exp(-theta*x-theta*(y-z)).*((x-y)).^(2*H-2).*z.^(2*H-2);
ff2=@(x) @(y,z) exp(-theta*x-theta*(y-z)).*((y-x)).^(2*H-2).*z.^(2*H-2);
ff3=@(x) @(y,z) exp(-theta*x-theta*(z-y)).*((x-y)).^(2*H-2).*z.^(2*H-2);
ff4=@(x) @(y,z) exp(-theta*x-theta*(z-y)).*((y-x)).^(2*H-2).*z.^(2*H-2);
Int1 = quadgk(@(x) arrayfun(@(x) quad2d(ff1(x),0,x,0,@(y)y),x),0,T)
Int2 = quadgk(@(x) arrayfun(@(x) quad2d(ff2(x),x,T,0,@(y)y),x),0,T)
Int3 = quadgk(@(x) arrayfun(@(x) quad2d(ff3(x),0,x,@(y)y,T),x),0,T)
Int4 = quadgk(@(x) arrayfun(@(x) quad2d(ff4(x),x,T,@(y)y,T),x),0,T)
INT = Int1+Int2+Int3+Int4
运行后
> In quad2d at 254
In @(x)quad2d(ff1(x),0,x,0,@(y)y)
In @(x)arrayfun(@(x)quad2d(ff1(x),0,x,0,@(y)y),x)
In quadgk>evalFun at 357
In quadgk>f1 at 375
In quadgk>vadapt at 269
In quadgk at 208
Warning: Reached the maximum number of function evaluations (2000). The result fails the global
error test.
请问怎么可以避免这个问题
请注意 H<0.75的情况 (赫斯特指数H<0.75时候)
辛苦您了
回复 21楼 weilinhy 的帖子
求助阿 感谢大家帮忙 拜谢回复 19楼 rocwoods 的帖子
请问 请问怎么可以避免这个问题请注意 H<0.75的情况 (赫斯特指数H<0.75时候)
辛苦您了
clear all
theta=1; T=10; H=0.68; %H is less than 3/4
ff1=@(x) @(y,z) exp(-theta*x-theta*(y-z)).*((x-y)).^(2*H-2).*z.^(2*H-2);
ff2=@(x) @(y,z) exp(-theta*x-theta*(y-z)).*((y-x)).^(2*H-2).*z.^(2*H-2);
ff3=@(x) @(y,z) exp(-theta*x-theta*(z-y)).*((x-y)).^(2*H-2).*z.^(2*H-2);
ff4=@(x) @(y,z) exp(-theta*x-theta*(z-y)).*((y-x)).^(2*H-2).*z.^(2*H-2);
Int1 = quadgk(@(x) arrayfun(@(x) quad2d(ff1(x),0,x,0,@(y)y),x),0,T)
Int2 = quadgk(@(x) arrayfun(@(x) quad2d(ff2(x),x,T,0,@(y)y),x),0,T)
Int3 = quadgk(@(x) arrayfun(@(x) quad2d(ff3(x),0,x,@(y)y,T),x),0,T)
Int4 = quadgk(@(x) arrayfun(@(x) quad2d(ff4(x),x,T,@(y)y,T),x),0,T)
INT = Int1+Int2+Int3+Int4
运行后
> In quad2d at 254
In @(x)quad2d(ff1(x),0,x,0,@(y)y)
In @(x)arrayfun(@(x)quad2d(ff1(x),0,x,0,@(y)y),x)
In quadgk>evalFun at 357
In quadgk>f1 at 375
In quadgk>vadapt at 269
In quadgk at 208
Warning: Reached the maximum number of function evaluations (2000). The result fails the global
error test.
页:
1
[2]