lxc0531 发表于 2008-8-2 23:40

关于积分问题

t=1:50:1000;
y=@(t)t.^2+1;
for i=1:length(t)
    g(i)=@(x,t,tc)x.*t./tc+quad(y,0,t(i));
end
A=[];
for i=1:length(t)
    A(i)=quad(g(i),0,t(i),[],[],[],[],t);
end
A
这个咋个错了嘛
Warning: Non-scalar arrays of function handles will continue to work in R14,
but will be illegal in R15, to support parenthesis notation for invocation
of function handles.To prepare for R15, and to avoid this warning,
use cell arrays of function handles instead of arrays.For more information,
type 'help function_handle' and see the section at the end entitled
Note on Backward Compatibility.
??? Error using ==> @(x,t,tc)x.*t./tc+quad(y,0,t(i))
Too many input arguments.
Error in ==> quad at 62
y = f(x, varargin{:});
在线等结果~

[ 本帖最后由 sigma665 于 2008-8-3 09:19 编辑 ]

messenger 发表于 2008-8-3 00:51

回复 楼主 的帖子

怎么不等了?

可惜,没看到答案

[ 本帖最后由 messenger 于 2008-8-3 01:19 编辑 ]

lxc0531 发表于 2008-8-3 07:51

哎 太晚了 熬不住了。。。还没有结果啊

sigma665 发表于 2008-8-3 09:20

回复 楼主 的帖子

带参数积分吗
搜索精华贴
页: [1]
查看完整版本: 关于积分问题