The samples from a digital audio file can be imported into Matlab by using a built-in function: audioread.
The basic syntax for using the function is the following:
[y, Fs] = audioread(filename)
Input Variable:
filename – a string containing the name of the file. Example: ‘testSignal.wav’
Output Variables:
y – an array containing the samples of the audio signal.
Fs – a scalar of the sound file’s sampling rate.
Continue on to see how we can play back and listen to audio with the sound function.
Further documentation for the audioread function is available here.
Links to other related functions: sound, audiowrite, audioinfo, plot

