马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
function yout=plot111
a=zeros(21,1);
n=0;
for i=1:21
a(i)=(1/(pi*500000000000)).*exp(-40000.*n.^2).*dblquad(@fun,0,25,0,2*pi,[],[],n);
i
n=n+1;
end
n=1:20;
plot(n,a);
function z=fun(x,y,n)
z=x.*(x.*cos(y)+20000.*n.^2).^2*(x.*sin(y)+20000.*n.^2).^2.*exp(-x.^2./(20000.*n.^2)-2.*x.*cos(y)-2.*x.*sin(y));
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> plot111>fun at 12
z=x.*(x.*cos(y)+20000.*n.^2).^2*(x.*sin(y)+20000.*n.^2).^2.*exp(-x.^2./(20000.*n.^2)-2.*x.*cos(y)-2.*x.*sin(y));
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, ...
Error in ==> plot111 at 5
a(i)=(1/(pi*500000000000)).*exp(-40000.*n.^2).*dblquad(@fun,0,25,0,2*pi,[],[],n);
>>
[ 本帖最后由 eight 于 2007-12-29 14:39 编辑 ] |