MATLAB: How can i compute the length of an integer

loops

if i have
int = 12345;
length_int = 5;
???

Best Answer

int=-123456789
max(ceil(log10(abs(int))),1)