x is just a double precision vector that should have 48000 samples. These elements are just indexed from 1 to 48000. So you can just do
20 msec of data with a sampling rate of 16 kHz is 320 samples. So you just have to create a hamming window of length 320 and multiply that element-by-element by a signal segment of the equal length.
y = x(1:320).*hamming(320);
Since both 160 and 320 divide 48000, you can simply reshape your data into matrix with 160 or 320 rows
y = reshape(x,[320 150]);
Then you can multiply each column by a hamming window
y = y.*repmat(hamming(320),1,150);
Best Answer