MATLAB: I need help please, how can I write a program to count the number of digits of an integer the user entered

MATLAB

For example, I asked the user to input a number and he entered 5984, how can I write a program to count how many digits it has (which is 4)? Thank you.

Best Answer

strlength(abs(5984) + "")