Find the maximum number of decimal places in a set of numbers - MATLAB Cody - MATLAB Central

Problem 713. Find the maximum number of decimal places in a set of numbers

Difficulty:Rate
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

17.02% Correct | 82.98% Incorrect
Last Solution submitted on May 15, 2025

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers3082

Suggested Problems

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!