bugs fixed in matrix class, tests added for sum block with matrix signal