Trapezium and Simpson's Rule, plotting graphically
1 次查看(过去 30 天)
显示 更早的评论
I have 3 tasks, to plot the rectangle, trapezium and simpson's rule.
For the rectangle rule, I've produced an array of x0:h:x1 where x0 and x1 are the upper and lower limits, and h is the strip width. I used a simple histogram method here, but I'm stuck for how to produce trapeziums, and how to then change the straight lines of the trapeziums to parabolas to suit the Simpson's rule.
Any help would be greatly appreciated.
I have another question concerning how to add numerical data to a subplot (4 graphs in a 2x3 array with 3 and 6 empty for the data I require.) I'll put this in a question of it's own too as it may be clearer.
0 个评论
回答(1 个)
Sean de Wolski
2012-4-19
doc trapz %or cumtrapz
What have you done thus far for simpson's rule?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Directed Graphs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!