MATLAB Implementation for Box-Counting Dimension Calculation

Resource Overview

MATLAB program for computing box-counting dimension. This implementation follows the box-counting principle to calculate the fractal dimension of 1D curves. The function FractalDim(y, cellmax) takes a 1D signal as input and returns its box-counting dimension using scalable grid analysis with configurable maximum cell size.

Detailed Documentation

This is a MATLAB implementation for box-counting dimension calculation. The program is developed based on the box-counting dimension principle to compute the fractal dimension of one-dimensional curves. The function D = FractalDim(y, cellmax) calculates the box-counting fractal dimension of an input 1D signal. - Parameter y represents the one-dimensional input signal - Parameter cellmax specifies the maximum cell size, which should be an even power of 2 (1, 2, 4, 8...) and greater than the data length - Return value D represents the box-counting dimension of y (typically D >= 1), calculated using the formula D = lim(log(N(e))/log(k/e)) - In the formula: N(e) denotes the minimum number of boxes required when using grid size e, k represents the cell edge length, and e represents the grid size. Implementation approach: The algorithm works by systematically varying grid sizes and counting the number of grid cells needed to cover the signal. The fractal dimension is derived from the slope of the log-log plot of box counts versus grid sizes. The program efficiently handles different signal resolutions through configurable cellmax parameter, ensuring accurate dimension estimation for various fractal structures.