MATLAB中求积分问题clear>> integrnd=@(x,y)0.2139*besselj(0,0.481*x)*cos(0.1465*y)*1.602*10^-9*y*0.2376*besselj(1,0.7710*x)*sin(0.2931*y);>> xmin=-5;>> xmax=5;>> ymin=-10;>> ymax=10;>> result=dblquad(integrnd,xmin,xmax,ymin,ymax);Error using ==>
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/28 22:07:14
MATLAB中求积分问题clear>> integrnd=@(x,y)0.2139*besselj(0,0.481*x)*cos(0.1465*y)*1.602*10^-9*y*0.2376*besselj(1,0.7710*x)*sin(0.2931*y);>> xmin=-5;>> xmax=5;>> ymin=-10;>> ymax=10;>> result=dblquad(integrnd,xmin,xmax,ymin,ymax);Error using ==>
MATLAB中求积分问题
clear
>> integrnd=@(x,y)0.2139*besselj(0,0.481*x)*cos(0.1465*y)*1.602*10^-9*y*0.2376*besselj(1,0.7710*x)*sin(0.2931*y);
>> xmin=-5;
>> xmax=5;
>> ymin=-10;
>> ymax=10;
>> result=dblquad(integrnd,xmin,xmax,ymin,ymax);
Error using ==> mtimes
Inner matrix dimensions must agree.
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中求积分问题clear>> integrnd=@(x,y)0.2139*besselj(0,0.481*x)*cos(0.1465*y)*1.602*10^-9*y*0.2376*besselj(1,0.7710*x)*sin(0.2931*y);>> xmin=-5;>> xmax=5;>> ymin=-10;>> ymax=10;>> result=dblquad(integrnd,xmin,xmax,ymin,ymax);Error using ==>
将命令改成这样,就可以了.
integrnd=@(x,y)0.2139*besselj(0,0.481.*x).*cos(0.1465.*y)*1.602*10^-9*y*0.2376.*besselj(1,0.7710.*x).*sin(0.2931.*y);
result=dblquad(integrnd,-5,5,-10,10)
result =
1.0608e-025 +4.9360e-025i