马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
t=1:50:1000;
[email=y=@(t)t.%5E2+1]y=@(t)t.^2+1[/email];
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 编辑 ] |