1 function log2M = log2M(M)
3 if ~isscalar(M) || ~isreal(M) || M<1 || ~isfinite(M)
4 error('M must be a positive real finitie scalar.');
8 error('M must be a number 2^k, where k is a positive integer.');
function iswhole(in x, in tol)
Determine whether or not input is a whole number.