Integration of a function using the trapezoid rule?

조회 수: 2 (최근 30일)
Kyle Miller
Kyle Miller 2016년 5월 2일
답변: Matt J 2016년 5월 2일
I need to integrate the function f(x)=sin(x) between the bounds of 0 and pi/2 using the trapezoid rule repeating the calculation with 3 different numbers of panels N=20,30,50. Also I have to show the errors between the results and the exact value of the integral. I'm not familiar with the trapezoid rule and I'm really struggling with this question. Thank you

답변 (1개)

Matt J
Matt J 2016년 5월 2일
The TRAPZ command will be helpful here.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by