MATLAB: How to extract data from a sound file and do calculations with the data

doit4meextract data from a sound file

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?

Best Answer

sum( message .* sind(3.6 * (0:length(message)-1))