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

 Akzeptierte Antwort

Mischa Kim
Mischa Kim am 18 Jun. 2014
Bearbeitet: Mischa Kim am 18 Jun. 2014

0 Stimmen

Charly, use the rat command:
rat(1/2/3)
ans =
0 + 1/(6)

1 Kommentar

Charly
Charly am 18 Jun. 2014
Thank you, I didn't know this simple command before ;)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 18 Jun. 2014

Kommentiert:

am 18 Jun. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by