Azzera filtri
Azzera filtri

Get JUST Sampling Rate

4 visualizzazioni (ultimi 30 giorni)
Andrea
Andrea il 21 Ott 2011
Hi everyone, i know my question could be strange but i really need to get just sampling rate from a wave file. How can i get it ? I think i can use wavread but how can i get JUST sampling rate and not the entire file as a vector. Thank u for your time guys.
Andrea

Risposte (3)

Rick Rosson
Rick Rosson il 22 Ott 2011
Please try the following:
filename = 'myfile.wav';
N = 1;
[ ~, Fs ] = wavread(filename,N);
For more information:
>> doc wavread
HTH.
Rick

Walter Roberson
Walter Roberson il 22 Ott 2011
http://www.mathworks.com/help/techdoc/ref/wavread.html can return the fs even if you just ask for 1 sample to be read. I would even try it asking for 0 samples to see if that would work.

Andrea
Andrea il 22 Ott 2011
IT WORKS! Thank u sooooo much.
ANDREA

Categorie

Scopri di più su Electrical Block Libraries in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by