Information about a digital audio file can be recovered by using a built-in function: audioinfo.
The basic syntax for using the function is the following:
filename – a string containing the name of the file. Example: ‘testSignal.wav’
info – a structure containing the following pieces of information about the file.
info.Filename – a string of the sound file’s name.
info.CompressionMethod – a string describing the method of data compression.
info.NumChannels – a scalar describing whether the file is mono (1) or stereo (2).
info.TotalSamples – a scalar representing the number of samples per channel.
info.Duration – a scalar representing the length of the file in seconds.
info.BitsPerSample – a scalar representing the bit depth of the file.
Further documentation for the function is available here.