matrix2tidy function

Convert IS, SMC or EnK output stored as a matrix to tidy format.