Variable name changing in a table

1 次查看(过去 30 天)
Cameron Kirk
Cameron Kirk 2019-12-16
评论: Cameron Kirk 2019-12-17
Hello,
I am trying to change the headers for each column of my table to names which I already created in a 1x29 cell array. However using the following code:
GaitAnalysisTable2 = array2table(Data(2:end,:),'VariableNames',GaitAnalysisTableNames);
I am always met with the message 'The VariableNames property must contain one name for each variable in the table'
Unsure as to why this is happening
Thanks
  3 个评论
Guillaume
Guillaume 2019-12-16
Unsure as to why this is happening
Easy to answer, the number of columns in Data doesn't match the number of cells in GaitAnalysisTableNames. As per the cyclist comment, without knowing what these are we can't tell you more.
Cameron Kirk
Cameron Kirk 2019-12-17
Thanks for asking both! It appears I've resolved this (but I now have another problem)

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by