看板 MATLAB 關於我們 聯絡資訊
我想請問一個資料讀取的問題 假設我有個檔案的資料格式如下 2007/08/08 01:00 123456. 我想將2007/08/08 01:00讀取為time的字串 123456.讀取為data的數字 所以用這個語法去讀 [time,data]=textread(filename,'%17s %6.1f','headerlines',3); 結果矩陣變成 time data 1 '2009/07/01' 0 2 ':00' 0 3 '2009/07/01' 1 4 ':00' 0 5 '2009/07/01' 2 整個格式讀出來是錯的 不知道該怎麼修改 還請大家幫忙了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.13.115
DKer:試試看加上 'delimiter',',' 11/20 14:50
DKer:textread好像預設讀到space就斷掉 11/20 14:51