# int2str2

## PURPOSE

Convert integer to string of given length; improved version of int2str.

## SYNOPSIS

function nstr = int2str2( n, nDigits )

## DESCRIPTION

     Convert integer to string of given length; improved version of int2str.

     Pads string with zeros on the left.  For integers similar to
      sprintf( '%03i', n ); %for nDigits=3
     If input n is an array, output is a cell array of strings of the same
     dimension as n.  Works also for non integers (pads to given length).

     USAGE
      nstr = int2str2( n, [nDigits] )

     INPUTS
      n        - integer to convert to string
      nDigits  - [0] minimum number of digits to use

     OUTPUTS
      nstr     - string repr. of n (or cell array of strings if n is array)

     EXAMPLE
      s = int2str2( 3, 3 ) % s='003'

     See also INT2STR

     Piotr's Image&Video Toolbox      Version 1.5
     Copyright 2008 Piotr Dollar.  [pdollar-at-caltech.edu]
     Please email me if you find bugs, or have suggestions or questions!
     Licensed under the Lesser GPL [see external/lgpl.txt]

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- confMatrixShow Used to display a confusion matrix.
- kmeans2 Fast version of kmeans clustering.
- imwrite2 Similar to imwrite, except follows a strict naming convention.
- seqIo Utilities for reading and writing seq files.
- seqReaderPlugin Plugin for seqIo and videoIO to allow reading of seq files.
- fevalImages Used to apply the same operation to all images in given directory.
- simpleCache A simple cache that can be used to store results of computations.