MATLAB: I have old code wavread and want to replace with audioread

audioreadsignal processingwavread

wavread doc function :
[...] = wavread('filename', N) returns only the first N samples from each channel in the file.
but in audioread doc function :
audioread(filename,samples) reads the selected range of audio samples in the file, where samples is a vector of the form [start,finish].
now how can I add N into audioread? My code is:
if true
signal_size=16000*10;
S(:,1)=wavread('all_sentences_train_DR1_MKLS0_M.wav',signal_size);
then
signal_size=16000*10;
S(:,1)=audioread('all_sentences_train_DR1_MKLS0_M.wav',signal_size);
end

Best Answer

audioread('all_sentences_train_DR1_MKLS0_M.wav',[1,signal_size]);
Related Question