How to truncate the array values?

My 400*400 array looks like this.
I want to truncate those exponential 'e'values from the array. for example 3.7267e-04 to 3.7267
Thanks in advance.

回答 (2 件)

Star Strider
Star Strider 2017 年 4 月 30 日

0 投票

See the documentation on format (link).
Image Analyst
Image Analyst 2017 年 4 月 30 日

0 投票

Just on a chance that you want the mantissa but no exponent:
a=[1.2e-6, 3.4e-7, 8.9e-10]
exponents = ceil(log10(a))-1
out = a .* 10.^exponents % Numerical values

2 件のコメント

Ad
Ad 2017 年 4 月 30 日
I am getting these results.
Image Analyst
Image Analyst 2017 年 4 月 30 日
You can consider any value less than 1e-15 as essentially 0. It's just truncation error.

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

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

質問済み:

Ad
2017 年 4 月 30 日

コメント済み:

2017 年 4 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by