필터 지우기
필터 지우기

Sound File/Split Wave and Analysis

조회 수: 12 (최근 30일)
Stevon Kline
Stevon Kline 2019년 11월 17일
답변: Jyothis Gireesh 2019년 11월 20일
4. In, Matlab, 'load chirp; loads a sound wave of bird chirps into a vector 'y' and the sampling rate into a variable 'Fs'. Play the sound using 'sound(y,Fs)', and you can hear 8 chirps. Break the wave into 8 segments of length 1560 and omit the remaining part. Plot the frequency distribution for each segment in 'subplot(4,2,k)' with k from 1 to 8. Which chirp has higher pitch than others? Listen carefully to verify the higher pitch.
So I've never dealt with a sound question. So is it y I'm seperating into 8 segments? How would I go about that, some form of reshape? or is their something else more specific that will omit the remaining part.
Please and thank you for the help.

채택된 답변

Jyothis Gireesh
Jyothis Gireesh 2019년 11월 20일
I am assuming that you want to separate the vector “y” into 8 segments with 1560 samples each. This may be directly indexed from the “y” vector
For instance, the first segment can be indexed as y(1:1560) and the next segment can be indexed as y(1561:3120)
A generalized code can be written as follows:
y_segment = zeros(8,1560);
for k = 1:8
y_segment(k,:) = y((k-1)*1560 + 1: k*1560);
end
And the remaining samples can be discarded. Now the subsequent operations may be performed on each row of the y_segmentmatrix.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by