Cut vector into many new vectors with defined lengths
Show older comments
I have a very long vector that I would like to cut up into new vectors of a specified length (400).
Accepted Answer
More Answers (2)
Walter Roberson
on 29 May 2015
0 votes
If you have the signal processing toolkit, you may wish to use buffer(), which is like reshape() but will zero-pad the final vector if necessary to make it fit. Also, buffer() can do overlapping.
Kimberly S
on 1 Jun 2015
0 votes
Categories
Find more on Resizing and Reshaping Matrices 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!