テキストファイルをスペースで区切り、array化する方法を教えてください。
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
readcell()によってテキストファイルをarray化するとき、"," (コンマ)ではなく" "(スペース)で区切りたいのですがどうすればよいでしょうか
0 comentarios
Respuestas (1)
Kojiro Saito
el 23 de Jun. de 2022
t = readcell('mytext.txt', 'Delimiter', ' ');
上記でうまくいかなかったらdetectImportOptionsでオプションを指定することで可能です。
opts = detectImportOptions('mytext.txt');
opts.Delimiter = ' ';
t = readcell('mytext.txt', opts);
0 comentarios
Ver también
Categorías
Más información sobre スプレッドシート en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!