I was getting a few of views on this but no replies (I'm assuming) because my files were in Prime 4.0. I've added some more files viewable without 4.0.
I'm having trouble creating a program with an if statement that has three ranges, i, j, & k. Results would be a matrix with k submatrices each with i rows and j columns. See attached.
The data structure of M,N and X looks rather unnecessary blown up.
Maybe something more simple would do the job as well:
If for some reason you really need those structures M, N you could easily create it using one of the following methods: