Convert Logical Column to Table
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Theodore
el 11 de Mzo. de 2023
Respondida: Star Strider
el 11 de Mzo. de 2023
How does one append a Nx1 logical to the right of a Nx4 table?
I assumed this would be a matter of horzcat(initialTable, logicalColumn)
But, I recieve an error of "All input arguments must be tables."
So the real question is:
how to convert the Nx1 logical column to a "table", such that I can horzcat the tables?
Thank you
0 comentarios
Respuesta aceptada
Star Strider
el 11 de Mzo. de 2023
T1 = array2table(rand(10,4), 'VariableNames',{'A','B','C','D'})
LogicalVector = rand(10,1)>0.5;
T1 = addvars(T1,LogicalVector,'After','D')
.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Tables en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!