Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2010-01-07
帖子: 1
声望力: 0 ![]() |
![]()
请高手指导一下,搞了半天就是搞不懂呀!谢谢!
实现f(x,y)=2y;在x属于[-1,-0.8],y属于[0.8,1]的区间积分。 程序如下: syms x y >> f = @(x,y)2*y; >> I=dblquad(f,-1,-0.8,0.8,1); 报错如下: ??? Attempted to access y(7); index out of bounds because numel(y)=1. Error in ==> quad at 70 if ~isfinite(y(7)) 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, ... 就是不清楚错在哪里呀,请高手指点下,谢谢! |
![]() |
![]() |