How to make variable names the same as the column headers when importing?
Ältere Kommentare anzeigen
Notes:
My column headings are V(001), I(B54)... There are thousands of them.
Currently if I use the import wizard, the column headers do not get used for the variable names. Matlab assigns VarName1, VarName2,...
I am importing a text file.
4 Kommentare
per isakson
am 15 Apr. 2015
Al
am 15 Apr. 2015
per isakson
am 15 Apr. 2015
"Is there a way to have Matlab remove the parenthesis?"
- With importdata   AFAIK: No!
- With textscan   Yes, but it takes a some lines of code.
Questions
- Do you really want 3400 separate variables?
- Do you know the types of the data in each column - string or numerical?
Al
am 15 Apr. 2015
Antworten (1)
Image Analyst
am 16 Apr. 2015
1 Stimme
I think the best approach is to use readtable() so that your fields have the names of your column headers. I think it will throw out the parentheses though.
Kategorien
Mehr zu Text Files finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!