I have a 100x100 array(A) and I am trying to figure how to noncircularly shift them to the right in different increments. For example I want row 1 to shift by none, row 2 by 10, row 3 by 20, row 4 by 30, and row 5 by 40 and for it to repeat this process every 5 rows. How can I achieve this?
A = rand(100,100);
Shift_Factor = ?;
Fill_Value = 0;
[Number_Of_Rows,Number_Of_Columns] = size(A);
A = [A zeros(Number_Of_Rows,Shift_Factor)];
for Row = 1: Number_Of_Rows
A(Row,:) = [Fill_Value*ones(1,Shift_Factor) A(Row,1:end-Shift_Factor)];
end
I tried setting Shift_Factor to [0,10,20,30,40] but that didn't work either