function f = project(c)

 

g=9.81;

m=68.1;

t=10;

v=40;

f=g*m/c*(1-exp(-c*t/m))-v;

 

function f=Trap(x)

f=.2+25*x-200*x^2+675*x^3-900*x^4+400*x^5;

 

 

%Trapezodal Rule

%Basic Formula: I = Base*Height

 

%integrate  f(x)=.2+25*x-200*x^2+675*x^3-900*x^4+400*x^5

%lower limit a=0

%upper limit b=.8

%number of segments n=4

clear

clc

a=0;

b=.8;

 

for i=2:10;

    n=i;

h=(b-a)/n;

h1(i-1)=h;

x=linspace(a,b,n+1);

y=0;

 

for i=2:n

    y=y+2*trap(x(i));

end

 

int(i-1)=((trap(a)+y+trap(b))/2)*h;

end   

m=2:n;

 

disp('   n          h          I')

[m'       h1'       int']