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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2014년 6월 18일

댓글:

2014년 6월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by