display result
조회 수: 3 (최근 30일)
이전 댓글 표시
some my results displays a form fraction. For example 5118141611252665/8796093022208 but i want it display in form 581.8653 How to do that? Help me. Tk a lot
댓글 수: 0
답변 (2개)
nanren888
2012년 2월 23일
Need a little more info. How did you get the first answer? fprintf('%9.4f',x);?
댓글 수: 0
Walter Roberson
2012년 2월 23일
It sounds as if you currently have
format rat
in effect. If so, try
format short g
Another possibility, though, is that you are working with symbolic numbers. If so then use double() to convert them to double precision.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!