% Exponential Function
% K. A. Connor 16 October 2015

% Frequency
f=1.6e6;w=2*pi*f;T=1/f;

% Amplitude
Vo=3;

% Decay Constant
tau=5*T;

% Range of Time (Time Vector)
t=30.*T.*[0:.001:1];

% Voltage Function
V=Vo.*exp(-t./tau).*cos(w.*t);

% Plot Voltage
plot(t,V,'Linewidth',2);grid;axis([0 30*T -Vo-1 Vo+1]);