import data from txt missing delimiters
4 views (last 30 days)
Christian von Spreckelsen on 22 May 2016
I am struggeling with importing data from a .txt file in my script, and i believe it is due to a '$' in my first coloumn. I have tried using csvread, textscan and importdata. The only thing i got to work was importdata, but it ignores the delimiters.
This is the command i use: "test = importdata(fullpathname,',')"
It gives me a 1291x1 array, which should have been a 1291x10.
I have attached the file im trying to import. Anyone got an idea how to import the data in different coloumns?
Todd Leonhardt on 22 May 2016
Have you tried the readtable() command yet? http://www.mathworks.com/help/matlab/ref/readtable.html
It works very well with delimited files. It also allows you to specify an optional 'Format' if it doesn't work correctly out of the box.