Save part of an array
Show older comments
Hello, For example I have the matrix A = [1 2 3 4 5 6 7 8 9 10.....10000]. And I want to save in a matrix B(k) where B(1) = the first 20 elements of A so B(1) = [1...20], B(2) = [21...40], B(3) = [41...60] etc... Thank you :)
Accepted Answer
More Answers (1)
Walter Roberson
on 15 Jun 2016
0 votes
Use mat2cell()
Categories
Find more on Creating and Concatenating 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!