Multidimensional Matrix; subrutine of 100X100 matrix

Hello
I'm doing a program to fix photo flaws matlab.
The multidimensional array will consist of all 100x100 matrices having 0 in all cells except those that form a "square" next multiple of 5, with lower left corner in a cell with coordinates multiple of 5 and are filled by 1 . As each "square" is defined by two opposite vertices, the number of squares with lower left vertex equal to (x, y) has to be 20-max {x, y} so that the total number of squares will be approximately (20x21) ^ 2/2 = 88200
In summary, I want to create a three dimensional matrix such that, for each i, the bidimensional submatrix A (i, *, *) is a 100x100 matrix consists of zeros, except for a few square as stated above. The index i must travel all possible matrices of this type (ie i = 1, .., 88200, if not a mistake above).
Any ideas?
Thanks

Answers (0)

Categories

Asked:

on 20 Mar 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!