boxcount: box counting

View source: R/fractals.R View source: R/fractals.R

boxcountR Documentation

box counting

Description

Count the number of boxes needed to cover all the 1s in a matrix of 0s and 1s.

Count the number of boxes needed to cover all the 1s in a matrix of 0s and 1s.

Usage

boxcount(mat, size)

boxcount(mat, size)

Arguments

mat

a square square matrix of 0s and 1s, whose size should be a power of 2.

size

the size (pixels per side) of the boxes, whose size should be a power of 2.

Value

an integer

an integer

Examples

g <- sierpinski(n=5)
boxcount(mat=g,size=16)
g <- sierpinski(n=5)
boxcount(mat=g,size=16)

geostats documentation built on Jan. 7, 2023, 5:32 p.m.

Related to boxcount in geostats...