MATLAB: How to convert audio signal having (4.82MB size ,44100 as sampling frequency , stereo signal ) to different frame length that is 1024 samples,512 samples and 2048 samples?Whether I should resample it if not than how is it possible in matlab

frame lengthsampling rate

my second question is that Can I convert this signal to different sampling rate also I mean at 22050Hz,48000hz etc.?or at different time interval 14.34 seconds,57.36seconds ?And its actual length in seconds is 28.68 seconds and total number of samples is 1264896?

Best Answer

framesize = 1024;
framedSignal = permute(reshape(YourSignal.', 2, framesize, []), [2 1 3]);
Now the first dimension of framedSignal is the sample number, the second dimension is the channel number, and the third dimension is the frame number.