Find length and dyadic length of square matrix
[n,J] = quadlength(x)
2-d image; size(n,n), n = 2^J (hopefully)
length(x)
least power of two greater than n
A warning message is issue if n is not a power of 2, or if x is not a square matrix.