Cannot create a table variable with a discontiguous index

19 次查看(过去 30 天)
I am trying to create new columns based on a condition as described in the code below:
for j = 1:length(data.var1)
column = 1;
while data.var1(j) > value0
data{column,j} = value1;
column = column + 1;
end
end
I then get this error message:
"Cannot create a table variable with a discontiguous index."
Has anyone come up with a solution for such kind of isses with Matlab tables? I would like to avoid creating the columns at the same time with the table.

回答(0 个)

类别

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

标签

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by