| Author |
Message |
techspeaks
Joined: 02 Jan 2007 Posts: 4
|
25 Jan 2007 11:40 quantization |
|
|
|
|
AoA to ALL!
I want to read a sound file in matlab, and set the sampling frequency to 8K. and represent each sample in 8-bits. play the result and also plot the frequency spectrum. i expect the spectrum should be from 0 to 4khz. plz tell me how to do all these in MATLAB.
simple & early reply is required.
|
|
| Back to top |
|
 |
usman
Joined: 04 Aug 2005 Posts: 28 Helped: 2
|
25 Jan 2007 12:50 Re: quantization |
|
|
|
|
u can do it so....
Y = wavread('file name');
Fs=8000;
N=8;
wavwrite(Y, Fs, N,'modified');
wavplay('modified')
best regards,
|
|
| Back to top |
|
 |
Google AdSense

|
25 Jan 2007 12:50 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
rsrinivas
Joined: 10 Oct 2006 Posts: 419 Helped: 36 Location: bengalooru
|
25 Jan 2007 12:52 quantization |
|
|
|
|
u can use the wavread command to read the file
and wavplay to play the wav file
note in the above two methods u can change the bits/sample and sampling frequency. but i suggest u to use a wav file which is sampled at 8k si that u can get a nice output.
as a wave file is a digitized oneu cannot quantize it again u can increase or decrease the resolution of bits/sample and if u increase a 8 bit/sample to 16 bit/sample tha sample will be zero padded to make it 16 bits wherin u don't expect any sound quality improvemet
regards
srinivas
|
|
| Back to top |
|
 |