# A digitised signal

1. Oct 14, 2008

### mralam

1. The problem statement, all variables and given/known data
Determine the digitised signal x[n] and use MATLAB to produce an annotated plot of x[n]
x(t) = sin(2*pi*F_1*t) + sin(2*pi*F_2*t)
F_1 = 0.5 khz
F_2 = 5 khz
F_s = 44.1khz

2. Relevant equations
t = n/F_s

3. The attempt at a solution

i got x[n] = cos([pi*n/44.1] - pi/2) + cos([10*pi / 44.1] - pi/2)
i need to double check that.

also i used the following matlab code to plot it:

Code (Text):

Fs = 44100; % sampling rate = 44.1 kHz

Ts = 1/Fs;  % sampling period

F1 = 500;   % signal1 frequency 0.5 kHz

F2 = 5000;  % signal2 frequency 5 kHz

t_d = 0:Ts:10; % sampling points 0, Ts, 2Ts, ... 1

n_d = round(t_d/Ts); % integer index, used for plotting

x_d1 = sin(2*pi*F1*t_d); % discrete-signal x_d1

x_d2 = sin(2*pi*F2*t_d); % discrete-signal x_d2

stem(n_d, x_d1); % plot x_d versus sample index

stem(t_d, x_d1); % plot x_d versus time

stem(n_d, x_d2); % plot x_d versus sample index

stem(t_d, x_d2); % plot x_d versus time

i need to check that what i am doing is correct before i move on to the other sections of the question.

thanks