Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

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

Created by Vincent

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).


Problem Group

Solution Statistics

48 correct solutions 66 incorrect solutions
Last solution submitted on Sep 27, 2015