Cut vector into many new vectors with defined lengths
显示 更早的评论
I have a very long vector that I would like to cut up into new vectors of a specified length (400).
采纳的回答
更多回答(2 个)
Walter Roberson
2015-5-29
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!