Problem with computing an integral of a function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Dimitris M
am 27 Feb. 2013
Kommentiert: Masoud Aghajani
am 4 Aug. 2020
Hello
I have problem computing the integral of a function:
The function is the following
fun = @(t) sin(2*pi*t*697)*(sin(2*pi*t*941)+sin(2*pi*t*1477))
Is strange cause when I compute eg. fun(2) everything seems to work, then when I am trying to compute the integral (see below I getting an error)
integral(fun,0,4)
Can someone please inform me on my mistake ?
Regards
3 Kommentare
Akzeptierte Antwort
Babak
am 27 Feb. 2013
change the fun to
fun = @(t) (sin(2*pi*t*697).*(sin(2*pi*t*941)+sin(2*pi*t*1477)))
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!