Specify data type for import data from csv by using readtable with different number of columns

3 views (last 30 days)
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

Answers (0)

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!