How to add a sequential number in a column of tables cell?
1 回表示 (過去 30 日間)
古いコメントを表示
Hey all, I have a 1 x 1280 cell which includes tables. In all tables, I want to add a number after the word that wrote in the first column. 1 for the first table, 2 for the second, 3 for third and so on.
For example:
In table one:
gridded_model
--------------------
GPCC_1
GPCC_1
GPCC_1
GPCC_1
..
GPCC_1
In table two:
gridded_model
--------------------
GPCC_2
GPCC_2
GPCC_2
GPCC_2
..
GPCC_2
In table three:
gridded_model
--------------------
GPCC_3
GPCC_3
GPCC_3
GPCC_3
..
GPCC_3
and so on untill the last table.
I don't want to change anything else in other columns and rows. As my cell is too large for attach here so I cut a little part of it and attached here.
Thank you all.
0 件のコメント
採用された回答
TADA
2020 年 2 月 12 日
for i = 1:numel(Test)
t = Test{i};
t.gridded_model = strcat(t.gridded_model, '_', num2str(i));
Test{i} = t;
end
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Identification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!