Topic 13.1: Trapezoidal Rule (Matlab)

Contents Previous Chapter Start of Chapter Previous Topic Introduction Notes Theory HOWTO Examples Engineering Error Questions Matlab Maple Next Topic Next Chapter

Finding an approximation of an integral using the trapezoidal rule of a function f(x) = cos(x) on the interval [0, 1.5]:

format long
0.5*( cos(0) + cos(1.5) )*1.5;

Copyright ©2005 by Douglas Wilhelm Harder. All rights reserved.