Merge two table columns (column 1: categorical data; column 2: double el) into one (column 3: categorical or string el) and replace columns 1,2 with 3 in the table
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Octavian
am 27 Jan. 2020
Beantwortet: Walter Roberson
am 27 Jan. 2020
Dear All,
I have a table with 4 columns, column 1: T.Letters = A; BC, DEF, G, HI .. etc (categorical array)
column 2: T.Numbers = 1;2;3;4;1;2;1;2;3 .. etc (double array)
How can I combine columns 1 and 2 into column 3: T.Lettersnumbers = A1; BC2; DEF3; G4; HI1 .. (containing categorical or string elements 'HI1'),
then insert it into the table in lieu of columns 1 and 2.
Many thanks,
Vio
0 Kommentare
Akzeptierte Antwort
Bhaskar R
am 27 Jan. 2020
T.Lettersnumbers = strcat(char(T.Letters), num2str(T.Numbers));
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Tables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!