テキストファイルをスペースで区切り、array化する方法を教えてください。
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
readcell()によってテキストファイルをarray化するとき、"," (コンマ)ではなく" "(スペース)で区切りたいのですがどうすればよいでしょうか
0 Kommentare
Antworten (1)
Kojiro Saito
am 23 Jun. 2022
t = readcell('mytext.txt', 'Delimiter', ' ');
上記でうまくいかなかったらdetectImportOptionsでオプションを指定することで可能です。
opts = detectImportOptions('mytext.txt');
opts.Delimiter = ' ';
t = readcell('mytext.txt', opts);
0 Kommentare
Siehe auch
Kategorien
Mehr zu スプレッドシート finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!