Adding a New Column to a Table but get a warning?
显示 更早的评论
Hello. I wanted to add a new column from a (500 x 4) Table, with some conditions, to another (500 x 13) Table. Not so sure why I get this warning sign, though they have the same number of row:
Warning: The new variables being added to the table have fewer rows than
the table. They have been extended with rows containing default values.
> In tabular/subsasgnDot (line 327)
In tabular/subsasgn (line 67)
Here is my code:
for i=1:size(Table1.Std,1); % count the number of rows in Table 1 (500x4)
if Table1.Std(i) > 10 || Table1.Std(i) <-10; % conditions applied
Table2.NewStd(i) =1; % adding a new column in Table 2
else Table2.NewStd(i) =0;
end
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Tables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!