Solutions by Kevin Colyer. I think there is some odd bug - my initial tries at rotating the matrix affected the original matrix even when I DIDN'T specify is rw in the sub.