Why is my matrix being multiplied by scientific notation?

45 ビュー (過去 30 日間)
Valerie
Valerie 2025 年 2 月 11 日 3:56
移動済み: Image Analyst 2025 年 2 月 11 日 4:43
>> Data = [0.8970, 4000; 0.2310, 8000;0.4500, 5000;0.1340, 12800]
Data =
1.0e+04 *
0.0001 0.4000
0.0000 0.8000
0.0000 0.5000
0.0000 1.2800
This is a double class and 64 bytes. Please help i dont know why its doing this.

採用された回答

David Goodmanson
David Goodmanson 2025 年 2 月 11 日 4:01
移動済み: Image Analyst 2025 年 2 月 11 日 4:43
Hi Valerie,
Since the data has widely varying values, there usually has to be an overall scaling of some kind. That is what you get in default format. Maybe you would prefer something like this:
format short g
Data
Data =
0.897 4000
0.231 8000
0.45 5000
0.134 12800
See
help format
for lots of other possibilities
  1 件のコメント
Valerie
Valerie 2025 年 2 月 11 日 4:15
移動済み: Image Analyst 2025 年 2 月 11 日 4:43
Thank you so much!!

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

その他の回答 (1 件)

Matt J
Matt J 2025 年 2 月 11 日 4:01
編集済み: Matt J 2025 年 2 月 11 日 4:04
That's the default way that double floats are displayed in the command window. It is purely a matter of display. The actual values contained in Data are what you set them to, and have not changed. See format for other display format options that you can set.

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by