how to display number in decimal ?

64 ビュー (過去 30 日間)
Reema Alhassan
Reema Alhassan 2018 年 7 月 13 日
回答済み: Steven Lord 2018 年 7 月 14 日
Hello everyone, I have tried :
format long
format short
value=double(value)
and the output still fraction number how can I convert it to decimal ?
  3 件のコメント
Walter Roberson
Walter Roberson 2018 年 7 月 13 日
int(value) is an error unless the value is symbolic.
Perhaps the user wants
format bank
for 2 decimal places. Or perhaps the user wants fix() or floor() . Or perhaps round() with a particular number of decimal places.
Stephen23
Stephen23 2018 年 7 月 13 日

サインインしてコメントする。

回答 (1 件)

Steven Lord
Steven Lord 2018 年 7 月 14 日
Since it's likely the "fraction number" is stored as a symbolic object, try calling either the vpa function or the double function with your symbolic number as input.

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by