MATLAB: Demodulate FSK Signals using Matlab

bfskdemodulationfskMATLAB

Hello,
I want to demodulate a BFSK signal that I generated previously. I have generated the signal using the next code:
f1 = 50;
f2 = 150;
t1 = [0:0.0001:1];
y1 = sin (2*pi*f1*t1);
y11 = sin (2*pi*f2*t1);
t2 = [1:0.0001:2];
y2 = sin (2*pi*f2*t2);
t3 = [2:0.0001:3];
y3 = sin (2*pi*f1*t3);
t4 = [3:0.0001:4];
y4 = sin (2*pi*f1*t4);
y = [y1 y2 y3 y4];
t = [t1 t2 t3 t4];
Where 'y' is my Signal. How could I demodulate 'y' to obtain an array of bits if I want to use a BFSK demoduation?
Thanks for the help!

Best Answer

You will need the Communication System Toolbox fskdemod function. There are links to related functions at the end of the page.
I don’t have the toolbox, so directing you to the online documentation is the best I can do.