powered by
Count the number of boxes needed to cover all the 1s in a matrix of 0s and 1s.
boxcount(mat, size)boxcount(mat, size)
boxcount(mat, size)
an integer
a square square matrix of 0s and 1s, whose size should be a power of 2.
the size (pixels per side) of the boxes, whose size should be a power of 2.
g <- sierpinski(n=5) boxcount(mat=g,size=16) g <- sierpinski(n=5) boxcount(mat=g,size=16)
Run the code above in your browser using DataLab