MATLAB: Shifting vectors with the same matrix using ‘for’ loop

MATLAB

Dear members
I have a matrix of dimensions 10*20
And I have the vector
I have the main program that I use for my need. But I want use this program for each 20 part of this vector.
I want use 'for' loop firstly to use the red part of the matrix with 20 first bits of V (black and orange), than to repeat the use of the blue part of matrix with :
1/ Orange and purple part of V
2/ Purple and green part of V
3/ Green and pink part of V
So it's a gender of shifting each 10 bits of V with the same part of matrix.
%%%%%%%
for …… (what I search to do)
Main program that I have
end
Thank you.

Best Answer

I'm not sure what you want to achieve. Maybe you can post the wanted output created by hand?
A bold guess:
V = randi([0,1], 50);
for k = 1:10:50 - 19
aV = V(k:k+19);
... Do what you want here
end