Visualizing a wav file

8 views (last 30 days)
Olalekan Adesina
Olalekan Adesina on 9 Oct 2021
Commented: Walter Roberson on 14 Oct 2021
Hi everyone. I have a .rec file that contains 14 different signals. When i open the .rec file in R Studio, my target signal was at Number 8. Then, i converted the file from .rec to .wav file. Please,can someone help with how i can visualize the .wav file to see the list of the signals?
  9 Comments
Olalekan Adesina
Olalekan Adesina on 10 Oct 2021
The file size is above 5MB

Sign in to comment.

Answers (1)

Tanmay Das
Tanmay Das on 12 Oct 2021
Hi,
To my understanding, you are facing issues in reading .wav file in MATLAB. You can use audioread function to read data from the file, and receive sampled data and a sample rate for that data. For visualization, the following code snippet can be referred:
[y,fs] = audioread(filename);
dt = 1/fs;
t = 0:dt:(length(y)*dt)-dt;
plot(t,y); xlabel('Seconds'); ylabel('Amplitude');
figure
plot(psd(spectrum.periodogram,y,'Fs',fs,'NFFT',length(y)));
You can refer to audioread and periodogram documentations for further information.
  2 Comments
Walter Roberson
Walter Roberson on 14 Oct 2021
You should open a new Question for that, as it is not related to this one.
When you open the new question, you should indicate there how you can tell where the boundaries are between the categories for each participant. Also, since you are talking about "seconds", whoever responds to your new Question is going to need information about the recording frequency.

Sign in to comment.

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!