Why this error using integral function?
1 次查看(过去 30 天)
显示 更早的评论
What is wrong?
>> T = @(x) 1/x; >> Q=integral(T,1,1000); Undefined function 'minus' for input arguments of type 'function_handle'.
Error in integral (line 4) N=(hmax-hmin)/0.0001;
0 个评论
采纳的回答
Michael Haderlein
2015-3-10
Fun thing is I get a different error message:
Error using /
Matrix dimensions must agree.
Anyway, if you change your definition of T to
T=@(x) 1./x;
(note the dot!), it should work.
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!