x=wavrecord(Fs,Fs);

with the following

 % create the recorder recorder=audiorecorder(Fs,8,1);
 % record one second of data record(recorder,1);
 % get the samples x = getaudiodata(recorder);转载自https://cn.mathworks.com/matlabcentral/answers/165279-how-to-change-wavrecord-to-audiorecorder?