create and fill new matrices every nth row of an initial matrix
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone! Here is my problem I have a 3060 X 2 matrix and what I want is to store the data every 170 rows (both columns) in a new matrix. So I want finaly to have 18 matrices of 170X2 each.
Thank you a lot!
0 个评论
回答(1 个)
Andrei Bobrov
2017-7-26
Let A - your matrix [3060 x 2]
out = permute(reshape(A',size(A,2),170,[]),[2 1 3]);
0 个评论
另请参阅
类别
在 Help Center 和 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!