Change variable names in a table

76 views (last 30 days)
Jesse
Jesse on 22 Nov 2018
Commented: Stephen23 on 27 Jul 2023
Hi all,
I would like to change all variable names within a table, to attached file, a cell array.
This is what i use now;
rf1.Properties.VariableNames = vars1

Accepted Answer

Stephen23
Stephen23 on 22 Nov 2018
Edited: Stephen23 on 22 Nov 2018
You can use a cell array of names, like this:
rfi.Properties.VariableNames = {'name1','name2',...}
  5 Comments
Sampath Rachumallu
Sampath Rachumallu on 29 Jun 2020
Unable to add spaces in Column names of a table using above.
Steven Lord
Steven Lord on 29 Jun 2020
The ability to have spaces in table variable names was introduced in release R2019b as stated in the Release Notes.

Sign in to comment.

More Answers (0)

Categories

Find more on Tables in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!