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.
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
<<
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167142/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167143/image.jpeg)
>>
0 commentaires
Réponses (1)
Soumya Saxena
le 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:
0 commentaires
Voir également
Catégories
En savoir plus sur Numerical Integration and Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!