How do I name the columns of my table by the names of row 1?
6 次查看(过去 30 天)
显示 更早的评论
I have inserted a table into matlab using this
pos=readtable("Pos_data.csv")
When I do this in R, the row names in row 1 become the columne names. However, in Matlab it does not do this. Please could you tell me how I name the columns based on the names in row 1 of the table ( as this is where the title of the columns are currently).
Thank-you,
0 个评论
采纳的回答
更多回答(1 个)
the cyclist
2020-2-3
It seems that all you need to do is this:
pos=readtable("Pos_data.csv",'ReadVariableNames',true)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!