Professional Documents
Culture Documents
182000320e Shovan Dhar PDF
182000320e Shovan Dhar PDF
Theory: A signal is a function of one or more variables that conveys information about some
(usually physical) phenomenon. A signal that is a function of discrete variables (e.g., an
integer variable)is said to be discrete time.
where n is an integer variable. called the sample number. A is the amplitude of the sinusoid.
w is the frequency in radians per sample. and θ is the phase in radians.
If instead of w we use the frequency variable f defined by
W=2πf
the relation becomes
Xn(t)= ACos(2πf +θ), -∞<n<∞
Matlab Coding:
N=21
x=sin(.2*pi*n);
n=0:1:N-1;
subplot(2,1,1);
stem(n,x);
xlabel('n');
ylabel('y(n)');
title('sinusoidal signal');
N=21
x=cos(.2*pi*n);
n=0:1:N-1;
subplot(2,1,2);
stem(n,x);
xlabel('n');
ylabel('y(n)');
title('cosine signal');