function [ int ] = Trap_Rule( points,dt ) %Trap_Rule will compute an integral using the trapezoidal rule % It takes in a vector of points and a sstep size to calculate the % integral int = (sum(points(2:(end-1))) + 0.5*points(1) + 0.5*points(end))*dt; end