필터 지우기
필터 지우기

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