フィルターのクリア

converting a text to number

5 ビュー (過去 30 日間)
joseph Frank
joseph Frank 2013 年 8 月 3 日
I have a cell array with cells that have the following format:
C={'-0.17'
'1.85*'
'0.22'
'0.43'
'2.23**'
'-0.18'
'-0.64'
'-0.44'
'-1.55'
'-2.10**'
'2.57**'
'1.27'
'0.18'
'-0.68'
'1.48'
'0.30'
'0.95'
'1.82*'
'-0.94'
'-0.21'
'2.48***'};
I want to convert to number but I am facing a problem which is that stars do exist in the cell array. Any hint about how to do the conversion?

採用された回答

Andrei Bobrov
Andrei Bobrov 2013 年 8 月 3 日
str2double(strrep(C,'*',''))

その他の回答 (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