%script6p8.m
%displays
the function i(t)=exp(-3t)(4cos(4t)-2sin(4t))
% and the
function vc(t)=exp(-3t)(-4cos(4t)+22sin(4t))
% use a
simle algorithm to estimate display time
tau=1/3;
tend=10*tau;
t=linspace(0,tend,350);
it=exp(-3*t).*(4*cos(4*t)-2*sin(4*t));
vc=exp(-3*t).*(-4*cos(4*t)+22*sin(4*t));
plot(t,it,'ro',t,vc,'bd'),grid,xlabel('Time(s)'),ylabel('Voltage/Current')
title('CURRENT
AND CAPACITOR VOLTAGE')
legend('CURRENT(A)','CAPACITOR
VOLTAGE(V)')