# BFSK modulation coding on MATLAB

Like for BPSK we generate random bits and then

data= round(rand(1,num_bit)); %Generate binary data
bpskModulated = 2*data-1 % mapping to -1 and +1

Can we do same for BFSK like

data= round(rand(1,num_bit));  %Generate binary data
s=data+j*(~data); %Baseband BFSK modulation


as constellation of BFSK is on 1+0*j [1,0,0] and other on entirely on imganary plane [0,1,0] ? If for BPSK it's according to constellation then why not FSK ?

• seriously, I've written multiple comments that your s is not BFSK. Exactly as Dan wrote to your last question already: it can't be FSK if you just switch phase according to your current symbol; that's PSK. – Marcus Müller May 18 at 19:02
• @MarcusMüller You have written such a great answer and I am thankful to you Muller however I had to show it to one of my colleague and I thought writing a separate question would be good, Thank you Muller, I think you need not to downvote me, I already need votes here for comments and understanding kinds of stuff and you have to support such young and new researcher in this community – good_omen92 May 18 at 21:08