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

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일

0 개 추천

Noga, Read the doc for textscan. There's a section on skipping columns.
Cheers,
Brett

카테고리

도움말 센터File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

태그

질문:

2011년 2월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by