필터 지우기
필터 지우기

how to extract data from a sound file and do calculations with the data?

조회 수: 4 (최근 30일)
I have a sound file named “message.txt” containing the waveform of a voice message embedded in a sinusoid with frequency of 220 Hz, and the sampling frequency is 22000 Hz.
file content consisting of 65120 rows of item as following shows
load the file, and the speech heard
load message.txt
soundsc(message, 22000)
Now what I want to do is do some mathematical calculations of these data.
where r[k] corresponds to message. say for example: r[k] corresponds to the floating point number in first row of the file for k=0. r[k] corresponds to the floating point number in second row of the file for k=1. r[k] corresponds to the floating point number in third row of the file for k=2. and so on. finally, r[k] corresponds to the floating point number in last row of the file for k=65119.
(the lenght of the message/signal length is 65120, obtained using length(message))
how to do that? does anyone get what i mean?
  댓글 수: 3
Walter Roberson
Walter Roberson 2012년 10월 5일
I am not sure what you mean about r[k] ?
Once you have loaded the data into the array "message" it will just be a numeric array and you can do any mathematical processing you want on it.
Passband  Modulation
Passband Modulation 2012년 10월 5일
r[k] corresponds to file massage. Say, r[k] corresponds to the floating point number in first row of the file for k=1.
i really dun know how to do the mathematical processing with matlab, could u write down the code? (plz note sin(3.6k) should be in degree)

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2012년 10월 5일
sum( message .* sind(3.6 * (0:length(message)-1))
  댓글 수: 7
Walter Roberson
Walter Roberson 2012년 10월 5일
Already answered in the Question you created for this.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by