version (1.37 KB) by Phillip M. Feldman
convert integer to string, using either integer or exponential format


Updated 31 Jan 2008

View License

int2strn(n,k,p) converts the number n to a string, expressing n in integer format if it can be written using k digits or less, and otherwise in exponential format with precision p. The default values of k and p are 6 and 3, respectively. When numbers are written in exponential format, extraneous leading zeros in the exponent are suppressed.

Cite As

Phillip M. Feldman (2022). int2strn (, MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!