I have to integrate the following expression
(3*sin^4 x)/x^4 with 0 as lower limit and 3 as upper limit.
my code is the following:
fun=@(x) (3*(sin.^4)(x))/x^4
q6=integral(fun,0,2)
what do i do wrong, it keeps saying ---> Unbalanced or unexpected parenthesis or bracket.
I can't see the problem - Anyone?

 Akzeptierte Antwort

Mischa Kim
Mischa Kim am 5 Mär. 2014
Bearbeitet: Mischa Kim am 5 Mär. 2014

0 Stimmen

Rasmus, use
fun = @(x) 3*(sin(x).^4)./x.^4;
sin^4 x is just another way of writing (sin(x))^4.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 4 Mär. 2014

Bearbeitet:

am 5 Mär. 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by