Skip to content

Commit

Permalink
Update exampletesting32intervals.m
Browse files Browse the repository at this point in the history
  • Loading branch information
kwyip authored Jul 3, 2017
1 parent 8d34e0b commit 120c901
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exampletesting32intervals.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
m = a + 0.5*h;
for i = 1:n
midpoint = midpoint + h*f(m);
m = m + h;
m = a + 0.5*h + i*h;
end
fprintf('The integral under midpoint is %f.\n', midpoint);

Expand Down Expand Up @@ -68,4 +68,4 @@

title('Plotting the function $e^{-x} \cos(2x)$','Interpreter','latex')
xlabel('x')
ylabel('y')
ylabel('y')

0 comments on commit 120c901

Please sign in to comment.