Replacing a column in a table
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I want to replace a column A in table S with a table that has the column title A.
In other words
t=array2table(A)
how can i replace column A in table s with t?
0 Kommentare
Antworten (1)
R
am 11 Sep. 2024
Here's a simple example on how to do achieve this
s = table([1; 2; 3], [4; 5; 6], 'VariableNames', {'A', 'B'});
% Create the new table
t = array2table([7; 8; 9], 'VariableNames', {'A'});
% Replace column A in table s with table t
s.A = t.A;
disp(s)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps 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!