Adding a string in front of every variable in a table
조회 수: 4 (최근 30일)
이전 댓글 표시
I was looking to make a script that added a string in front of every variable in my table.
For example, I want to add "Table_" in front of every variable in the table I've attached to this post.
댓글 수: 0
채택된 답변
Voss
2022년 9월 20일
% read the table
t = readtable('Ztable.xlsx','VariableNamingRule','preserve');
% modify the variable names
t.Properties.VariableNames = strcat('Table_',t.Properties.VariableNames);
% save the table
writetable(t,'Ztable_modified.xlsx')
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!