MATLAB: Audioread cannot find WAV file

audioreadMATLAB

Hello,
we are trying to load a WAV audio file into matlab for filtering. Oddly, It cannot seem to load the audio file without running into an incorrect path error. I have tried resetting the userpath and have also tried specifying the exact file location of audiofile instead of the file name. I have also tried turning the file location into a string variable named file but the results are the same. I am a bit puzzled in terms of what I might be doing wrong.
userpath("C:\Users\Jerry\Desktop\eeglab_current\eeglab2019_1")
[y,Fs] = audioread("PLEAS_43s_Male_Laugh")

Best Answer

It is likely most efficient to use the fullfile function to identify the file.
Settting the userpath may not be doing what you believe it is doing.
Also, for best results, include the extension:
[y,Fs] = audioread("PLEAS_43s_Male_Laugh.wav")
Obviously I cannot test this, so I am posting it as UNTESTED CODE.