Hello everyone, i am confuse with interleaving task.

3 views (last 30 days)
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.

Accepted Answer

Image Analyst
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
Guillaume on 19 Aug 2016
Possibly cleaner:
splitmatrices = mat2cell(yourmatrix, 100, [150 150])

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!