replaceUp function

Replace matrix values triangular upper part and by band for the lower part.