how read such txtfile
이전 댓글 표시
hi,
how I can read such txtfile
1::1193::5::978300760
1::661::3::978302109
1::914::3::978301968
1::3408::4::978300275
1::2355::5::978824291
1::1197::3::978302268
1::1287::5::978302039
when I used textscan, I'm not get the data thanks
댓글 수: 10
Walter Roberson
2012년 7월 25일
Please show your textscan attempt.
Matt Kindig
2012년 7월 25일
What is the proper form of the data? From the one you've shown, I assume that each line should be a separate row of four integers-- is this correct? Do the colons have a particular meaning aside from separating columns? Are you ignoring any of the columns?
huda nawaf
2012년 7월 25일
huda nawaf
2012년 7월 25일
Jan
2012년 7월 25일
What do you want as output? You forgot to explain this very important detail.
huda nawaf
2012년 7월 25일
Jan
2012년 7월 25일
And what how many columns do you want? Is "::" the separator and you want 4 columns of data, or is ":" the separator and you get 7 columns, while the 2nd, 4th and 6th get invalid values - if so, which invalid values?
per isakson
2012년 7월 25일
편집: per isakson
2012년 7월 25일
hi huda, Why do you include space in your format-string, "'%d %d %d %d'"? There are no spaces in the text-file.
Oleg Komarov
2012년 7월 25일
119 questions asked so far but the style hasn't changed by a comma from the initial requests. I'm still wandering why bother at all...
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!