How to read a text file, with first column containing letters, and edit the numbers keeping the first column same?
3 ビュー (過去 30 日間)
古いコメントを表示
The image is as shown below. I want to read the numbers only from the text file, and edit them accordingly, keeping the letters column (first column) as same. Thank you.
0 件のコメント
採用された回答
KSSV
2018 年 7 月 2 日
fid = fopen(myfile) ;
S = textscan(fid,'%s %f %f %f') ;
fclose(fid) ;
C1 = S{1} ; % column 1
C2 = S{2} ; % column 2
C3 = S{3} ; % column 3
C4 = S{4} ; % column 4
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!