added test for converting between matrix types