Problem 713. Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not count as significant. No significant digits will result in an answer of 0.
For example:
x = [0.01 0.888 1.0 40.151 39.1244];
y = 4;
The maximum number of significant decimal places from the input is 4 (39.1244).
Solution Stats
Problem Comments
-
15 Comments
Show
12 older comments
Dylan
on 8 Dec 2023
I don't understand how to solve using strings..
Ethan
on 9 Dec 2023
hi
Thomas
on 23 Mar 2024
fun
Solution Comments
Show commentsProblem Recent Solvers2991
Suggested Problems
-
7725 Solvers
-
Sum all integers from 1 to 2^n
15874 Solvers
-
812 Solvers
-
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
767 Solvers
-
特定の値がベクトル内に含まれているかを確認するコードを書こう
319 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!