Hello everyone, i am confuse with interleaving task.

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

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

Possibly cleaner:
splitmatrices = mat2cell(yourmatrix, 100, [150 150])
Thanks. It really helps me a lot.

Sign in to comment.

More Answers (0)

Categories

Asked:

on 19 Aug 2016

Commented:

on 22 Aug 2016

Community Treasure Hunt

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

Start Hunting!