matlab Integration function

1 次查看(过去 30 天)
Good morning everyone
I would like to integrate the following function from 0 until 0.018. Can somebody give me a suggestion about the matlab code for this task ? I have tried different options (quad option) but MATLAB gives me a error.
y=8.3151e+006*x^3-7.9844e+005*x^2+20672*x-0.586
Thanks
Sergio

采纳的回答

Andrei Bobrov
Andrei Bobrov 2011-11-2
f=@(x)8.3151e+006*x.^3-7.9844e+005*x.^2+20672*x-0.586
result = quad(f,0,.018)
or
p = [8315100 -798440 20672 -0.586] % coefficients of polynom
result = diff(polyval(polyint(p),[0 .018]))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Polynomials 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by