→ ice77: 謝謝各位,已經找出方法了! 10/19 16:28
→ ice77: 先用num2str,將這些數值轉換成char格式 10/19 16:30
→ ice77: 再用strrep,此時相鄰的數字已可以合起來了 10/19 16:31
→ ice77: 最後再用cellstr,還有cellfun,此時數字已全為double格式! 10/19 16:32
附上程式碼
for i=1:length(C)
C_test{i,4}=num2str(C_test{i,3});
end
C_test2=C_test(1:end,4);
C_test2=strrep(C_test2, ' ', '');
C_test3=cellstr(C_test2);
C_test3=cellfun(@str2num,C_test3);
※ 編輯: ice77 (123.193.237.117), 10/19/2016 16:32:36