Rank: 7939 based on 12 downloads (last 30 days) and 1 file submitted
photo

Petr Dvorak

E-mail
Company/University
Czech Technical University in Prague

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Petr
Updated   File Tags Downloads
(last 30 days)
Comments Rating
24 Jun 2014 num2xchar.m Extends number with zeros to demanded length. Zeros are added to beginning of the number. Author: Petr Dvorak conversion 12 2
  • 1.0
1.0 | 1 rating
Comments and Ratings by Petr View all
Updated File Comments Rating
24 Jun 2014 num2xchar.m Extends number with zeros to demanded length. Zeros are added to beginning of the number. Author: Petr Dvorak

I didn't know it, thank you!

02 Jan 2013 Antenna Arrays Produces radiation pattern for Broadside, Endfire, Binomial, and Dolph - Chebyshev antenna arrays Author: Amol Mahurkar

Comments and Ratings on Petr's Files View all
Updated File Comment by Comments Rating
24 Jun 2014 num2xchar.m Extends number with zeros to demanded length. Zeros are added to beginning of the number. Author: Petr Dvorak Dvorak, Petr

I didn't know it, thank you!

24 Jun 2014 num2xchar.m Extends number with zeros to demanded length. Zeros are added to beginning of the number. Author: Petr Dvorak Cobeldick, Stephen

This submission just seems to replicate the behavior of MATLABs inbuilt functions "sprintf"/"fprintf":
sprintf('%0*i',5,123)
A drop-in replacement for this submission can thus be easily defined in one line:
fun = @(num,dgt) sprintf('%0*i',dgt,num);
The submission is also much slower and offers much less control over the output format than "sprintf", although that error checking may be useful to someone.

Contact us