display result
1 回表示 (過去 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 で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!