I have 6 audio signals each of length 2.32 sec,sampled at 44.1KHZ sampling rate with 16 bits floating point ,I want to divide these signals into frames each of length 23.2 msec(1024 samples) in matlab?
3 views (last 30 days)
Show older comments
PRATIBHA WARKADE
on 20 Aug 2015
Commented: PRATIBHA WARKADE
on 26 Aug 2015
length of signal=2.32 second, sampling frequency=441000 Hz, bits/sample=16
0 Comments
Accepted Answer
Star Strider
on 20 Aug 2015
Use the reshape function:
signal = rand(2.32*44100, 6); % Create Data
for k1 = 1:6
colsize = fix(size(signal(:,k1),1)/1024)*1024; % Maximum Length For ‘reshape’
sig_mtx{k1} = reshape(signal(1:colsize, k1), 1024, []); % Columns Are Frames
end
I used a cell array here. You can use a 3D array if you prefer.
0 Comments
More Answers (1)
Walter Roberson
on 20 Aug 2015
See the buffer() function if you have the signal processing toolbox. It is especially useful if you need to overlap the buffers.
8 Comments
Walter Roberson
on 22 Aug 2015
You cannot have an entity less than 1 bit, which is about 1E-4 Kilobyte. 3E-42 Kilobyte is getting down into the range of 1E-25 electrons -- not physically measurable without very very high precision equipment.
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!