FSK matlab code | FSK modulation matlab source code

This page of MATLAB source code covers FSK matlab code. The output plots and mathematical equations of FSK modulation matlab code are mentioned. FSK modulation stands for Frequency Shift Keying Modulation.

The FSK modulation is a digital modulation technique in which frequency of the carrier signal varies in accordance to the digital binary data (1 or 0). Binary logic-1 represents higher carrier frequency (i.e. 'f1') and logic-0 represents lower carrier frequency (i.e. 'f2') .

FSK modulation
Fig.2 FSK Modulation

The figure-1 depicts FSK modulation type. As shown inputs are digital binary data and analog carrier while output is analog FSK modulated signal. FSK modulation offers increased immunity against noise at the cost of larger bandwidth. Also refer difference between ASK, FSK and PSK modulation types>>.

FSK matlab code

b = input('Enter the Bit stream \n '); %b = [0 1 0 1 1 1 0];
n = length(b);
t = 0:.01:n;
x = 1:1:(n+1)*100;
for i = 1:n
if (b(i) == 0)
b_p(i) = -1;
b_p(i) = 1;
for j = i:.1:i+1
bw(x(i*100:(i+1)*100)) = b_p(i);
bw = bw(100:end);
wo = 2*(2*pi*t);
W = 1*(2*pi*t);
sinHt = sin(wo+W);
sinLt = sin(wo-W);
st = sin(wo+(bw).*W);
grid on ; axis([0 n -2 +2])
grid on ; axis([0 n -2 +2])
grid on ; axis([0 n -2 +2])
grid on ; axis([0 n -2 +2])
figure %pburg(st,10)

Input and Output of FSK modulation matlab source code

Run the downloaded FSKModulation.m file after unzipping the folder. and provide input as follows.

FSK matlab code input

After the input is given press "ENTER" key, you will get output matlab image as below.

FSK matlab code output

DOWNLOAD FSK matlab code .m file

Download FSKModulation rar file containing matlab file>>.

Useful Links to MATLAB codes

Refer following as well as links mentioned on left side panel for useful MATLAB codes.
OFDM Preamble generation  Time off estimation corr  Freq off estimation corr  channel estimation  11a WLAN channel  PN sequence generation  OFDMA Tx Rx  AES DES  carrier aggregation  CCDF  FIR Filter  IIR Filter  Low Pass FIR  Viterbi decoder  CRC8 CRC32 

RF and Wireless tutorials

WLAN  802.11ac  802.11ad  wimax  Zigbee  z-wave  GSM  LTE  UMTS  Bluetooth  UWB  IoT  satellite  Antenna  RADAR