- you incorrectly used the optional third input, apparently to try and define the number of header lines. The correct way to specify the header lines is to use a key-value argument.
- your data uses decimal commas. MATLAB does not handle decimal commas, which means you need to convert the commas to points before converting to numeric: search this forum for different ways to do this.

## 3 Comments

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/484666-question-about-import-a-txt-file-into-matlab#comment_754901

⋮## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/484666-question-about-import-a-txt-file-into-matlab#comment_754901

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/484666-question-about-import-a-txt-file-into-matlab#comment_754903

⋮## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/484666-question-about-import-a-txt-file-into-matlab#comment_754903

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/484666-question-about-import-a-txt-file-into-matlab#comment_755134

⋮## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/484666-question-about-import-a-txt-file-into-matlab#comment_755134

Sign in to comment.