Fill a column of a table with a series

1 次查看(过去 30 天)
Hi,
I have first column vector of a table with numbers like the bellow. how can i modify the column vector to make it from 1 to 9?
table = readtable('prices.xlsx');
tableData = table(:,1);
tableDatanew1
_____________
1
2
3
4
5
6
1
2
3

采纳的回答

Walter Roberson
Walter Roberson 2022-5-30
tableData.tableDatanew1 = (1:height(tableData)).';

更多回答(0 个)

类别

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

产品


版本

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by