标题:[求助]这个二重函数的积分用matlab怎么求?(关于dblquad函数的用法)
只看楼主
qqyanrui
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-12-26
 问题点数:0 回复次数:0 
[求助]这个二重函数的积分用matlab怎么求?(关于dblquad函数的用法)
函数定义如下:


syms t1 y1 y n;

k=33.44;  
l=5.48e-6;
P=1000;   
v=1.5;   
r=1.75;   
t0=0;      
t=4.4;     
D=42;      
b1=63;  
b2=63;   

x=5;
z=1;


h=y-y1;
h=0;

m=20;

g0=4*k*(t-t1);
g1=(x+v*(t0-t1)+sqrt(r^2-y1^2))/sqrt(g0);
g2=(x+v*(t0-t1)-sqrt(r^2-y1^2))/sqrt(g0);

f0=k*P/(l*pi*r^2);
f1=(1/(4*pi*k*(t-t1)))*exp(-((z-2*n*D)^2)/g0);
f2=exp(-((h-2*n*(b1+b2))^2)/g0);
f3=exp(-((h-2*n*b2-2*(n-1)*b1)^2)/g0);
f4=exp(-((h+2*n*b1+2*(n-1)*b2)^2)/g0);

f5=(2/sqrt(pi))*((-1)^n)*((g1^(2*n+1))/(sym('n!')*(2*n+1)));
f6=(2/sqrt(pi))*((-1)^n)*((g2^(2*n+1))/(sym('n!')*(2*n+1)));

sum1=symsum(f1,n,-m,m);
sum2=symsum(f2,n,-m,m);
sum3=symsum(f3,n,1,m);
sum4=symsum(f4,n,1,m);
sum5=symsum(f5,n,0,m);
sum6=symsum(f6,n,0,m);


f=sum1*(sum2+sum3+sum4)*(sum5-sum6)

运行后可以得到函数f的表达式,我想用dblquad在积分区域(f,0,2,0,3)上对f进行数值积分,可是总是出现错误,具体错误信息如下

??? Error using ==> mrdivide
Matrix dimensions must agree.

Error in ==> thermal01 at 2
qq=(25/3344/pi/(22/5-t1)*exp(-2825761/(73568/125-3344/25*t1))+25/3344/pi/(22/5-t1)*exp(-2550409/(73568/125-3344/25*t1))+25/3344/pi/(22/5-t1)*exp(-2289169/(73568/125-3344/25*t1))+25/3344/pi/(22/5-t1)*
Error in ==> quad at 62
y = f(x, varargin{:});

Error in ==> dblquad>innerintegral at 88
    Q(i) = feval(quadf, intfcn, xmin, xmax, tol, trace, y(i), varargin{:});

Error in ==> quad at 62
y = f(x, varargin{:});

Error in ==> dblquad at 64
Q = feval(quadf, @innerintegral, ymin, ymax, tol, trace, intfcn, ...


请高手指点一下

搜索更多相关主题的帖子: matlab 函数 dblquad 用法 积分 
2010-06-13 10:33



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-310136-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.048767 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved