Why this error using integral function?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ove Gustafsson
le 10 Mar 2015
Commenté : Ove Gustafsson
le 11 Mar 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 commentaires
Réponse acceptée
Michael Haderlein
le 10 Mar 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.
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!