日期:2014-05-17 浏览次数:20938 次
Matrix2D^ Matrix2DCalculator::SubMatrix(Matrix2D^ matrix,int row,int column,int rows,int columns){ int lie = matrix->Columns; Matrix2D^ a = gcnew Matrix2D(rows,columns,0); for(int i =row; i<rows+row; i++){ for(int j = column; j<columns+column; j++){ a->Elements[(i-row)*columns+(j-column)] = matrix->Elements[i*lie+j]; } } return a; }