You are on page 1of 1

Lab Session 3(a)

Activity: Acquire 1000 points of cosine wave having frequency of 60Hz using for loop. Plot the Signal.
fs = 1000;
f = 60;
t = 0:1/fs:1;
y = zeros(size(t));
for n = 1 : length(t)
y(n) = cos(2*pi*f*t(n));
end
plot(t,y), xlabel('time(s)'), ylabel('strength');
title('60hz cosine wave'), grid on;

Lab Session 3(b)


Numerical models of Exponential Signals with Real Power:
t = 0 : 0.001 : 0.8;
y3 = exp(-2*t); % Developing real numerical model of simple decaying
exponential signal
plot(t,y3),xlabel('Time'),ylabel('f(t)'),title('f(t)=\ite^{-2t}'), grid on;
% plots real decaying exponential signal
y4 = exp(2*t); % Developing real numerical model of simple oscillatory
exponential signal

You might also like