I am trying to make a table and label using Table_RMA = array2table (CoP_Balance(:,1:98),'VariableNames',{'Patient','Gender','Dg','Aff_Side','Inj_Site','Ax','Condition','CoP_Side',.....the other 90 names}); However, I Keep on getting this error: Error using matlab.internal.tabular.private.varNamesDim/validateAndAssignLabels (line 321) Duplicate variable name: 'CoP_Side'.
For some reason even when I change 'CoP_Side' to any other word I still get the same error message.
Any suggestions on what am doing wrong?
cheers
Eduardo

댓글 수: 1

KSSV
KSSV 2018년 9월 3일
I think this variable name: CoP_Side is repeating.

댓글을 달려면 로그인하십시오.

 채택된 답변

Cesar Antonio Lopez Segura
Cesar Antonio Lopez Segura 2018년 9월 3일

0 개 추천

Hi Luis Eduardo,
We need your complete code to help you. But using this example I have not errors.
vector = cat( 1,[1:8],[8:15],[16:23] );
Table_RMA = array2table (vector,'VariableNames',{'Patient','Gender','Dg','Aff_Side','Inj_Site','Ax','Condition','CoP_Side'})

추가 답변 (1개)

Luis Eduardo Cofré Lizama
Luis Eduardo Cofré Lizama 2018년 9월 3일

0 개 추천

Thanks for helping me out guys. The funny thing is that whereas the error kept on saying that CoP_Side was the problem, I found it in the name of other variables! Problem solved, however, it was strange the error was pointing in a different direction.
cheers
Eduardo

카테고리

도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by