How can I generate a binary number in MATLAB

Status
Not open for further replies.

piash

Member level 1
Joined
Feb 22, 2007
Messages
38
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,531
matlab binary numbers

i am new in MATLAB.
for a purpose i need a matlab script of generationg binary number.
i am giving input in a M-FSK modulator in the blockset, so i need an input which will give me specific binary number that i want to give.

can anyone help me about this?? very urgent plz............
 

matlab binary number

First you select format of binary number by using command "quantizer" then use "num2bin(quantizer_value,number_to_convert)" command.
For example try below :
x = 7.125;
q = quantizer([4 12]);
x_in_binary = num2bin(q,x);
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…