function Hw2

%% Section 2.1 Problem 29

t1 = 12;
Nt=100;

t_axis=zeros(Nt+1,1);
y=zeros(Nt+1,1);

for it=1:Nt+1
    t=(it-1)*t1/Nt;
    t_axis(it,1)=t;
    y(it,1)=12+(8*cos(2*t)+64*sin(2*t))/65-788/65*exp(-t/4);
end

clf
figure(1)
hold on
plot(t_axis,y,'b -','LineWidth',2)
plot(t_axis,y*0+12,'r -','LineWidth',2)

print('Fig1','-depsc',figure(1))