Problem 1274. Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros.
Example:
x = 11; y = 7; d = 10;
z = adiv(x,y,d)
z=
1.571428571
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers41
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15764 Solvers
-
Numbers with prime factors 2, 3 and 5.
679 Solvers
-
Convert a vector into a number
613 Solvers
-
Make a run-length companion vector
655 Solvers
-
Create a matrix X, where each column is a shifted copy of the vector v
221 Solvers
More from this Author11
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!