convert decimal number to ratio
조회 수: 8 (최근 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
댓글 수: 0
채택된 답변
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 Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!