Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
how to use comm.FSKModulator function

Subject: how to use comm.FSKModulator function

From: Timothy Koh

Date: 11 Mar, 2013 11:21:10

Message: 1 of 1

I would like like to transmit the data E using FSK modulation. However I i am facing some problems declaring the input for comm.FSKModulator. The following is my codes. I hope someone with this area of knowledge can help me with it.

E= <2457600x1 double>
hEnc = comm.BCHEncoder('CodewordLength',127,'MessageLength',8);
hDec = comm.BCHDecoder('CodewordLength',127,'MessageLength',8);
hMod = comm.FSKModulator(??);
hChan = comm.AWGNChannel('NoiseMethod','Signal to noise ratio (SNR)','SNR',1);
hDemod = comm.FSKDemodulator(??);
hError = comm.ErrorRate('ComputationDelay',3);

encodedData = step(hEnc,E);
modSignal = step(hMod, encodedData);
receivedSignal = step(hChan, modSignal);
demodSignal = step(hDemod, receivedSignal);
receivedBits = step(hDec, demodSignal);
errorStats = step(hError, E, receivedBits);

fprintf('Error rate = %f\nNumber of errors = %d\n',errorStats(1), errorStats(2))


Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us