. Find a MATLAB built in function that is used to find the lowest common denominator of fractions.
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, I new to Matlab and I need help with this one problem.
"Find a MATLAB built in function that is used to find the lowest common denominator of fractions. Then use that function to show that the lowest common denominator of (hint, your input and solution will only contain one denominator values.'
4 Kommentare
Walter Roberson
am 23 Aug. 2019
The first of those. builtin() has some fairly specific uses. I have rarely had need for it.
Antworten (3)
David Durost
am 23 Aug. 2019
3 Kommentare
Walter Roberson
am 23 Aug. 2019
lcm(4,10) is 20. What do you get when you multiply 1/4 by 20? How many 20'th is 1/4 ? What do you get when you multiply 1/10 by 20? How many 20'th is 1/10 ?
Walter Roberson
am 23 Aug. 2019
Be sure to distinguish between 'l' (lower-case L) and '1' (digit for the number One)
Walter Roberson
am 23 Aug. 2019
[n1, d1] = rat(1/4);
[n2, d2] = rat(1/10);
com = lcm(d1, d2);
Now that you have the least common multple of the denominators, you can calculate the equivalent fractions. The code is quite easy, but I will not provide it as you are obviously working on an assignment.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Descriptive Statistics finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!