If current and previous factors are not same then move to next row and insert the current factor
if ( factor [ j ] != factor [ j - 1 ] ) : NEW_LINE INDENT tpr += 1 NEW_LINE M [ tpr ] [ 0 ] = factor [ j ] NEW_LINE j += 1 NEW_LINE tpc = 1 NEW_LINE DEDENT