Skip to content

Commit

Permalink
Update compositetrapezoid.m
Browse files Browse the repository at this point in the history
  • Loading branch information
kwyip authored Jul 2, 2017
1 parent e579652 commit 1412eca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compositetrapezoid.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%n subinterval
%Ka Wa Yip (github:kwyip)
function trapezoid = compositetrapezoid(f, a, b, n)
h = (b - a)/n;
trapezoid = 0.5*(f(a) + f(b));
Expand Down

0 comments on commit 1412eca

Please sign in to comment.