str2double:getting rid of the decimal points

2 ビュー (過去 30 日間)
joseph Frank
joseph Frank 2011 年 4 月 25 日
Hi,
A={'2248866001'
'2249926001'
'2249924001'
'2249925001'
'2249906001'}
I am trying to convert to double using str2double(A) and I am receiving: 2248866001.00000 2249926001.00000 2249924001.00000 2249925001.00000 2249906001.00000
How can I get rid of these zeros?

採用された回答

Matt Fig
Matt Fig 2011 年 4 月 25 日
format long g
A={'2248866001'
'2249926001'
'2249924001'
'2249925001'
'2249906001'};
str2double(A)
ans =
2248866001
2249926001
2249924001
2249925001
2249906001
This is a format setting, not a precision setting. See the help for FORMAT to decide which display setting is best for you.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by