Simplify column indexing in loop. Add test assertions.

I'm starting to understand what the "starter matrix" is supposed
to look like wrt sines and cosines. The first row is ones. The 2nd
row is just cosine. The next is just sine. The 4th row is every other
cosine value, with that whole array repeated. Similar for sine in row
5. Row 6 is every third value of cosine, starting at indices 0, then
1, then 2, etc, concatenating those arrays in that order.