How to divide an wav file into segments

  • Thread starter Thread starter AK2
  • Start date Start date
  • Tags Tags
    File
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 5K views
AK2
Messages
39
Reaction score
0
Does anybody know how to do this in matlab?
 
Physics news on Phys.org
According to the MATLAB documentation, MATLAB imports mono sound as an m x 1 and stereo as m x 2, where m is the total number of samples in the file:
http://www.mathworks.com/help/techdoc/import_export/f5-132080.html#bsdufi0

Based on that information, you should be able to chop these up into shorter segments, and then re-save the resultant shorter segments using wavwrite:
http://www.mathworks.com/help/techdoc/ref/wavwrite.html
 
Last edited by a moderator: