Hello everyone, i am confuse with interleaving task.
3 views (last 30 days)
Show older comments
i want to divide a code with length (100,300) into two halves i.e. (100,150) & (100,150). How can i achieve this task on matlab.
0 Comments
Accepted Answer
Image Analyst
on 19 Aug 2016
What does "a code with length" mean? Do mean "a matrix with size" instead? Interleaving means to combine, not split into halves. If you want halves of a matrix, why can't you just do normal indexing. I mean, I assume you know how to do super basic things like
leftHalf = yourMatrix(:, 1:150);
rightHalf = yourMatrix(:, 151:end);
2 Comments
Guillaume
on 19 Aug 2016
Possibly cleaner:
splitmatrices = mat2cell(yourmatrix, 100, [150 150])
More Answers (0)
See Also
Categories
Find more on Matrix Indexing 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!