Values over 1000 use e

4 ビュー (過去 30 日間)
Sarah Yun
Sarah Yun 2019 年 12 月 16 日
回答済み: ME 2019 年 12 月 16 日
Hi,
I have values in a column
Matlab changes values over 1000 to strange format with e
1.1102e+03
997.652882707152
How can I change all e numbers to normal integers?
How can I round all integers in column to 2 dp?
Thank you
  1 件のコメント
Adam Danz
Adam Danz 2019 年 12 月 16 日

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

回答 (2 件)

Vladimir Sovkov
Vladimir Sovkov 2019 年 12 月 16 日
read matlab help on the "format" command.
try "format longg".

ME
ME 2019 年 12 月 16 日
For the first part of your question, you can use:
format longG
which will allow you to see the maximum possible number of digits without resorting to scientific notation. At some point though, very large numbers will still appear in scientific notation - which is unavoidable.
The second part is that you can just use:
round(A,2)
to round all values of an array A to two decimal places.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by