Hi,
I have a huge file that I want to read only the 4th row with delimiter ';'. I want to read everything in this row into one single string so that I can count the number of ';' and determine how many columns there are. What is the code to do this?
I have tried
result = textread('U:\EMC\SMI8A_75_FA.csv', '%s', 1, 'headerlines', 3);
but the results are off.
Thanks!

 채택된 답변

per isakson
per isakson 2017년 11월 11일
편집: per isakson 2017년 11월 11일

0 개 추천

One way using textscan
fid = fopen( 'U:\EMC\SMI8A_75_FA.csv', 'r' );
result = textscan( fid, '%s', 1, 'headerlines',3, 'Delimiter','\n');
fclose( fid );

추가 답변 (0개)

카테고리

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

태그

질문:

2017년 2월 16일

편집:

2017년 11월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by