Prev: plot graphs above each other
Next: Overlapping XTicks
From: Kean Foster on 16 Jun 2010 05:30 Hi, I need some help. Is there a simple way to convert a number to a string that always has a certain number of digits ie. 1 becomes 01. Cheers Kean
From: Jan Simon on 16 Jun 2010 07:06 Dear Kean! > I need some help. Is there a simple way to convert a number to a string that always has a certain number of digits ie. 1 becomes 01. sprintf('%.3d', 1) >> ans= 001 Good luck, Jan
From: Kean Foster on 16 Jun 2010 09:31 Thanks Jan, works a treat! "Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <hvab73$i4o$1(a)fred.mathworks.com>... > Dear Kean! > > I need some help. Is there a simple way to convert a number to a string that always has a certain number of digits ie. 1 becomes 01. > > sprintf('%.3d', 1) > >> ans= > 001 > > Good luck, Jan
|
Pages: 1 Prev: plot graphs above each other Next: Overlapping XTicks |