I ma trying to do Numerical Integration but getting an error
Mostra commenti meno recenti
i am trying to Numerical integration by following this example
"Create the function f(x) = e-x2(ln x)2. fun = @(x) exp(-x.^2).*log(x).^2; Evaluate the integral from x=0 to x=Inf. q=integral(fun,0,Inf) "
but i am getting "too many input arguments" error message.
kindly help me to solve this problem
Regards
4 Commenti
Jan
il 3 Mar 2016
Please post the failing code. How could we suggest an improvement without seeing it?
noaman naseer
il 3 Mar 2016
Torsten
il 3 Mar 2016
Use quad instead of integral:
Best wishes
Torsten.
noaman naseer
il 3 Mar 2016
Risposte (1)
Roger Stafford
il 3 Mar 2016
0 voti
My guess is that somewhere in your code you have defined another function and given it the name 'integral'. Matlab is confused by the conflict of names.
2 Commenti
noaman naseer
il 3 Mar 2016
Steven Lord
il 3 Mar 2016
What does "which -all integral" display? [Don't include the quotes when you type that command at the MATLAB prompt.]
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
