テキストファイルをスペースで区切り、array化する方法を教えてください。
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
readcell()によってテキストファイルをarray化するとき、"," (コンマ)ではなく" "(スペース)で区切りたいのですがどうすればよいでしょうか
0 commentaires
Réponses (1)
Kojiro Saito
le 23 Juin 2022
t = readcell('mytext.txt', 'Delimiter', ' ');
上記でうまくいかなかったらdetectImportOptionsでオプションを指定することで可能です。
opts = detectImportOptions('mytext.txt');
opts.Delimiter = ' ';
t = readcell('mytext.txt', opts);
0 commentaires
Voir également
Catégories
En savoir plus sur スプレッドシート dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!