You said: "a fraction with the numerator smaller than the denominator", so test cases 3 to 6 are not consistent to this sentence. :-/
The Test Suite and problem statement are now consistent with each other, but I don't think anybody learned at school to write 1 9/7, rather than 2 2/7.
Other issues with the Test Suite (or problem statement): FIRSTLY, 1 2/3 is equal to 1 4/6, or 1 6/9, et cetera, but only the first option is accepted in the Test Suite. SECONDLY, the rounding used in the inputs means that more correct answers would be e.g. 1.33 = 1 33/100. LASTLY, there is no possible way to know that 2.00 should be represented as 1 5/5, rather than 1 4/4, or 1 3/3 et cetera.
Least common multiple of many numbers
Generate a vector like 1,2,2,3,3,3,4,4,4,4
04 - Scalar Equations 1
Matlab Basics - Set unwanted parts of a vector to zero
Matrix to column conversion
Who is the baby and who is the daddy in this family?
Find supported functions
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office