How to create variable name for .CSV file in matlab?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have CSV file as below
I want to create names for VarName upto end of the matrix. I have to write the code for changing the VarNames automatically. I need the output as below. Please let me know if anyone knows the ans.
Thank you in advance.
3 Kommentare
Antworten (1)
Arunkumar M
am 28 Nov. 2018
Hope you have already imported data into workspace as table. Assuming table name is Reducedfeatures
% for defining name for all columns at once
Reducedfeatures.Properties.VariableNames = {'C1','C2',.......}
% for defining specific column names, example: first and second column
Reducedfeatures.Properties.VariableNames([1:2]) = {'C1','C2'}
4 Kommentare
Claudio Ignacio Fernandez
am 28 Jul. 2020
Hello
I'm following your example but I'm getting this message
Unable to perform assignment
because dot indexing is not
supported for variables of this
type.
Jan
am 29 Jul. 2020
@Claudio: Please post your code. How is your variable called "Reducedfeatures" here defined in your case?
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!