made the matrix more safe

there are no matrices with just one dimension equal to 0. There is only one matrix having no entries, namely one of size (0,0).
some corrections on MatrixTS, ver 1.0.0.0
added some useful functions to the Matrix classes