Solution 8.8.14 load eoft asum = 0.0;; % %Find the length of the array y(t) Note:this the step response. It has to be %pulled into Matlab before this program is run. % topm = size(eoft);; top = topm(1,1) % %Initialize counter. % %Pull data into arrays % e=eoft(1:top,2) t=eoft(1:top,1) %Setcounter % k=2;; % % while ( k <= top) l= k-1;; asum = asum + ( ( (e(k)+e(l) ) /2 ) *( t(k) - t(l) ) );; f(k) = asum;; k=k+1;; end save time.dat t-ascii save errf.dat f -ascii asum plot(t,f) 1