MATLAB Answers

how to change the e+00 format

10 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2021 年 4 月 9 日
編集済み: VBBV 2021 年 4 月 9 日
on computation i get a vector value as below
index = [7.8651e+04;177445]
because of the e+04 format, on further computation i get error
i wanted to convert the e+04 format to the below one if any value is in e+00 format
what should i do to remove the e+00 format
index = [78651;177445];

採用された回答

DGM
DGM 2021 年 4 月 9 日
編集済み: DGM 2021 年 4 月 9 日
As far as anything that handles numeric data is concerned, 7.8651e+04 and 78651 are the same. The formatting is merely a matter of display.
I'm going to go out on a limb and assume that you're doing something to create indexes into an array and that you're generating non-integer indices. In that case, you can probably just do
index=round(index);
or similar.
Otherwise, share some info about the code and the specific error message you're getting.

その他の回答 (1 件)

VBBV
VBBV 2021 年 4 月 9 日
編集済み: VBBV 2021 年 4 月 9 日
%f true
index = [7.8651e+04;177445]
uint64(index)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by