フィルターのクリア

convert decimal number to ratio

8 ビュー (過去 30 日間)
Charly
Charly 2014 年 6 月 18 日
コメント済み: Charly 2014 年 6 月 18 日
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)
  1 件のコメント
Charly
Charly 2014 年 6 月 18 日
Thank you, I didn't know this simple command before ;)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by