I am reading a .wav file using wavread command and then selecting the first column to select the left channel only. But the values of the channels are in floating point like 0.000349 but I need these values to be in bits. How to convert these values to bits? Is there any built-in command or any algorithm that you developed?
There is a "quantize" function available in MATLAB which will directly convert the floating point numbers into fixed-point number of desired word length.
There is a "quantize" function available in MATLAB which will directly convert the floating point numbers into fixed-point number of desired word length.
q= quantizer[x,y] % set the Fixed point format to X bit with Y decimal digits
h=num2hex(q, number) % h is the string which represents the hex value in FP
example
q = quantizer ([16,15]); %FP 16 bit Q15 format
h=num2hex(q,-0.5);