Specify data type for import data from csv by using readtable with different number of columns
3 views (last 30 days)
Show older comments
Hello everybody,
i tried to import a .csv file with different number of columns. I used readtable. The only way to do so was to set the ExtraColumnsRule to 'addvars'. But that gives some entries with ExtraVar in my table, where I can not specify the data type. I would like to read them as double, but they are char by default and are not accessable...
can you give me a hint how to solv that?
I'm using Matlab 2017b, but delimitedTextImportOptions and fixedWidthImportOptions are not available...
I attached a file with testdata and the code.
Regards,
Christian
0 Comments
Answers (0)
See Also
Categories
Find more on Logical 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!