convert decimal number to ratio

12 次查看(过去 30 天)
Hello,
I would like to convert decimal number to ratios, when it is possible.
For example :
0.25 -> 1/4
1/2/3 -> 1/6
...
Some ideas ? Thank you

采纳的回答

Mischa Kim
Mischa Kim 2014-6-18
编辑:Mischa Kim 2014-6-18
Charly, use the rat command:
rat(1/2/3)
ans =
0 + 1/(6)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by