Why this error using integral function?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ove Gustafsson
am 10 Mär. 2015
Kommentiert: Ove Gustafsson
am 11 Mär. 2015
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 Kommentare
Akzeptierte Antwort
Michael Haderlein
am 10 Mär. 2015
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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Downloads finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!