Reading a txt file with different number of rows for each column

1 次查看(过去 30 天)
Hey guys, I want to read the following text file and to convert it to cell array. is there any way to remove columns that there are no variables in each cell of them? I'm currently using textscan, which reads all the '%s' columns and don't read the '%*s' columns. Is there any way to do it automatically?
l R neutral l !MODE RECORD CR 1000
l R neutral l .
l R neutral l .
l R neutral l .
(I want to remove the columns 5- RECORD, 6- CR, 7- 1000)

回答(1 个)

Brett Shoelson
Brett Shoelson 2011-2-14
Noga, Read the doc for textscan. There's a section on skipping columns.
Cheers,
Brett

类别

Help CenterFile Exchange 中查找有关 Standard File Formats 的更多信息

标签


Translated by