Adding a New Column to a Table but get a warning?
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!