MATLAB: Quantize/digitize wav file

wavfile

how can I digitize/quantize .wav file in matlab
well, basically i am trying to modulate it,
[X, Fs, nbits] = wavread('filename');
M=16;
modulated_sig=qammod(X,M);
but it keeps giving me an error saying
??? Error using ==> qammod at 39 Elements of input X must be integers in the range [0, M-1]

Best Answer

You need to quantize, just like you did for your generated signal in your earlier versions.