I have n=6:
x=0;
n=6; % n is the number of intervals and must be > 0 and even
a=0; b=pi;% a is the lower bound and b is the upper bound
f=5+13*sin(x); % Function
I=simpson13(f,a,b,n)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!