plz mail me a code for frequency modulator and demodulator

 Accepted Answer

ES
ES on 3 Dec 2013

1 vote

If you have Communication Toolbox, all standard modulation and de-modulation functions are defined in that. If you do not have it, you will have to code it based on the equations from your text book.

3 Comments

NAQASH AWAN
NAQASH AWAN on 5 Dec 2013
Edited: Walter Roberson on 5 Dec 2013
i want a code for SIN function like this
Fs = 8000; % Sampling rate of signal
Fc = 3000; % Carrier frequency
t = [0:Fs-1]'/Fs; % Sampling times
s1 = sin(2*pi*300*t)+2*sin(2*pi*600*t); % Channel 1
s2 = sin(2*pi*150*t)+2*sin(2*pi*900*t); % Channel 2
x = [s1,s2]; % Two-channel signal
dev = 50; % Frequency deviation in modulated signal
y = fmmod(x,Fc,Fs,dev); % Modulate both channels.
z = fmdemod(y,Fc,Fs,dev); % Demodulate both channels.
plot(z);
this code not work properly
Walter Roberson
Walter Roberson on 5 Dec 2013
Edited: Walter Roberson on 5 Dec 2013
What do you observe when you run it? Is there an error message? How does the output differ from what you expect?
Note: that code cannot work, as you try to plot a variable "z" that you have never assigned a value to.
NAQASH AWAN
NAQASH AWAN on 10 Dec 2013
z is the output for demodulated single r u send me a code like this that have a sine function and that code perform the modulation and demodulation i shall be thankful to you

Sign in to comment.

More Answers (0)

Asked:

on 3 Dec 2013

Commented:

on 10 Dec 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!