In reply to Daymond Ling.

Very nice! I like that you used a matrix of subscripts. I don't think I have done that very often. Your code works because matrices are stored in row-major order.