Convert Logical Column to Table
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Star Strider
il 11 Mar 2023
T1 = array2table(rand(10,4), 'VariableNames',{'A','B','C','D'})
LogicalVector = rand(10,1)>0.5;
T1 = addvars(T1,LogicalVector,'After','D')
.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Tables in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!