Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

17

EXPERIMENT-3

AIM: Program to convert CD data into DVD data


SOFTWARE REQUIRED : MATLAB 7.0.1
PROGRAM:
Fs=input('sampling frequeny fs=');
A=input('relative amplitude A=');
B=input('relative amplitude B=');
f1=input('signal frequency f1=');
f2=input('signal frequency f2=');
t=0:1/Fs:1;
% time vector
x=A*cos(2*pi*f1*t)+B*cos(2*pi*f2*t); % generate signal
y=resample(x,48,1); % interpolate signal by I
subplot(1,3,1);
stem(x(1:150)) % plot original signal
xlabel('Discrete time, nT ')
ylabel('Input signal level')
subplot(1,3,2);
title('interpolation');
stem(y(1:250)) % plot interpolated signal.
xlabel('Discrete time, I x nT')
ylabel('Interpolated output signal level')
y1=resample(y,44,48);
title('decimation');
subplot(1,3,3);
stem(y1(1:250)) % plot decimated signal.
xlabel('Discrete time, nT')
ylabel('Decimated output signal level')
INPUT VALUES:

sampling frequenc fs=5000


relative amplitude A=20
relative amplitude B=15
signal frequency f1=1000
signal frequency f2=800

18

OUTPUT WAVEFORMS:

RESULT: Hence CD data is converted into DVD data.

19

You might also like