Skip to content

de2bi

legacy · scripts/legacy/de2bi.m

: b = de2bi (d)
: b = de2bi (d, n)
: b = de2bi (d, n, p)
: b = de2bi (d, [], p)
: b = de2bi (d, …, flg)

Convert nonnegative decimal integers to base-p digit rows.

Each element of d becomes one row of b. A matrix d is read in column-major order as d(:). The default base is 2. The default flag is "right-msb" (column 1 holds the least significant digit); "left-msb" puts the most significant digit first. Optional n, p and flg may appear in any order among the trailing arguments. Output class matches d.

Communications Toolbox compatibility shim (MATLAB documents int2bit for new base-2 code).