フィルターのクリア

convert string with digits to double

2 ビュー (過去 30 日間)
Bou
Bou 2014 年 2 月 28 日
編集済み: Azzi Abdelmalek 2014 年 2 月 28 日
Hello,
I want to convert the following cells to double values;
'12:57:33' '36.6' '0.857101'
'12:57:51' '37.0' '0.891594'
'12:58:37' '37.7' '0.898841'
'12:59:49' '38.8' '0.893043'
str2double does not seem to work...Can anybody help me? Thanks in advance!

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 2 月 28 日
編集済み: Azzi Abdelmalek 2014 年 2 月 28 日
v={'12:57:33' '36.6' '0.857101'
'12:57:51' '37.0' '0.891594'
'12:58:37' '37.7' '0.898841'
'12:59:49' '38.8' '0.893043'}
out=[datenum(v(:,1)) str2double(v(:,2:3))]

カテゴリ

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