How would I code the trapezoidal rule and simpsons rule for this question with MATLAB. The problem is that the upper y limit is 0.5+0.5x and this is causing problems with my code.

7 Ansichten (letzte 30 Tage)
<<
>>

Antworten (1)

Soumya Saxena
Soumya Saxena am 14 Sep. 2017
Please consider using the "trapz" function:
Also consider the example on the "integral2" function documentation:
Please also refer to the following file exchange link for simpson's rule:

Kategorien

Mehr zu Numerical Integration and Differential Equations 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!

Translated by