Why this error using integral function?
1 回表示 (過去 30 日間)
古いコメントを表示
Ove Gustafsson
2015 年 3 月 10 日
コメント済み: Ove Gustafsson
2015 年 3 月 11 日
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!