필터 지우기
필터 지우기

how to relate .wav file read through fread and wavread??

조회 수: 5 (최근 30일)
abhinibesh
abhinibesh 2015년 2월 27일
답변: Star Strider 2015년 2월 27일
I opened the same .wav file through fread first and wavread next.result was as follows:-
fread:- size of variabe: 240044x1 first 30 values: 82 73 70 70 164 169 3 0 87 65 86 69 102 109 116 32 16 0 0 0 1 0 1 0 64 31 0 0 128 62
wavrea:- size of variable: 120000 first 20 values: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0078 0 0 0 0.0078 0 0 0 0 0 0 -0.0078 0
Now, since through both the commands I am reading the same .wav file, therefore they should essentially be the same. Firstly the size of fread variable is double that of wavread variable plus 44 elements more. Secondly, the values in previous case are integers, while in latter case are decimals less that 1.
Can someone help me relate both these??

답변 (1개)

Star Strider
Star Strider 2015년 2월 27일
They shouldn’t be the same. The .wav file format contains metadata that wavread strips out (and displays if you ask it to, for instance the sampling frequency), then decodes and outputs only the actual sound information. See the Wikipedia article I linked to for more information.

카테고리

Help CenterFile Exchange에서 Pulse and Transition Metrics에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by