MATLAB: Counting the number of digits

digits

Hi,
how can I compute the number of digits A=[12875] how can I get 5 as the number of digits in A?

Best Answer

One way:
numel(num2str(A))