MATLAB CREATES AN EXTRA COLUMN WHILE READING A TXT FILE
Show older comments
Hello ,
I have a txt file which i have attached and it have 4 columns. When i read it with matlab it creates an extra column with zeros so it is like that :
2 1 1 0 0
1 1 1 0 0
and the txt file is this
2 1 1 0
1 1 1 0
i use this command to open the txt file
n_values = textread('n_values.txt');
can anyone help me ?
2 Comments
Walter Roberson
on 7 Sep 2020
Which MATLAB release are you using, and which operating system? I am not seeing that on R2020a on Mac.
I note that your file has both carriage return and line feed, so it is most likely to have been created on Windows.
chntua chntua
on 7 Sep 2020
Accepted Answer
More Answers (0)
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!