Current location - Education and Training Encyclopedia - Graduation thesis - How to wrap the paper matrix if it is too long?
How to wrap the paper matrix if it is too long?
for(I = 0; I<4; i++)

b[I]= a[0][I];

for(I = 0; I< 1; i++)

for(j = 0; j & lt4; j++)

a[I][j]= a[I+ 1][j];

for(I = 0; I<4; i++)

a[2][I]= b[I];

Revise as follows:

for(I = 0; I<4; I++)// Copy the value in the first row of the matrix to copy to the last row, otherwise it will be overwritten.

b[I]= a[0][I];

for(I = 0; I<2; I++)// Moves the matrix up one row, which can be equal to 1.

for(j = 0; j & lt4; j++)

a[I][j]= a[I+ 1][j];

for(I = 0; I<4; I++)// Copy the first line to the last line.

a[2][I]= b[I];