Computing result by matrix multiplication and printing results
for ( let i = 0 ; i < maxSize ; i ++ ) { for ( let j = 0 ; j < maxSize ; j ++ ) { out [ i ] += circular_shift_mat [ i ] [ j ] * col_vec [ j ] ; } document . write ( out [ i ] + " " ) ; } }