This preview shows page 1. Sign up to view the full content.
Unformatted text preview: %repeating the pattern until the end) will be correct col=flip(:); %will make the flip array a vertical column; this will make our changed %array a vertical column in order to perform the barrel shift function to %shift our array the desired number of times new=rotateVec(col,number_shift); %will barrel role the col array number_shift times shifted=reshape(new,r,c); %will linearize the shifted array; this will recreate our original array %with the shifted positions shifted=reverseCols(shifted); %will flip the even columns again; reshaping the array will make the even %columns unflipped again so we have to flip them again to get the desired %result...
View Full Document
This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.
- Spring '08