% Attenuation signal 
alpha=300;      % alpha:attenuation constant
fc=200;    % fc:carrier frequency
% obserbvation time: 0 to 20ms
% Number of samples: 200samples
t=linspace(0, 0.02, 100);
x=exp(-alpha*t).*sin(2*pi*fc*t);
figure(1);
plot(t,x);grid on
xlabel('Time [sec]');
ylabel('Attenuation signal x(t)');
% Different frequency : 220Hz
% Different alpha: 330
fc=220;
alpha=330;
t1=linspace(0, 0.02, 100);
x=exp(-alpha*t1).*sin(2*pi*fc*t1);
figure(2);
plot(t1,x);grid on
xlabel('Time [sec]');
ylabel('Attenuation signal x(t)');

