File Exchange

image thumbnail

Convert decimal integer to arbitrary base.

version 1.1.0.0 (1.4 KB) by DS
DECIMAL_CONVERT generates a vector of coefficients representing a base 10 integer in a chosen base.

1 Download

Updated 09 Apr 2012

View License

DECIMAL_CONVERT(D,B) returns the representation of decimal integer, D, as a vector of coefficients such that:

D = xn*B^n + ... + x2*B^2 + x1*B^1 + x0*B^0

where B is the chosen base.

See also polyval, dec2base, base2dec, de2bi, bi2de.

Cite As

DS (2020). Convert decimal integer to arbitrary base. (https://www.mathworks.com/matlabcentral/fileexchange/35133-convert-decimal-integer-to-arbitrary-base), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

ali shirali

have you checked decimal_convert(x, x)? it returns zero for me!

HONG XING

Updates

1.1.0.0

Text edit; no code changes.

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux