Professional Documents
Culture Documents
Lab 3 Af
Lab 3 Af
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;