I have a table:
Values = [2.1 2.4 2.5 2.6; ...
4.1 4.4 4.5 4.6; ...
6.1 6.4 6.5 6.6];
ID = {'x1', 'x4', 'x5', 'x6'};
Ta = array2table(Values,'VariablesNames', ID);
Now I have another list of IDs:
ID = {'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7'};
And I want to expand my table such that, on the columns where I have data in Ta I put the values of Ta, and the cells on which I dont have data I get NaN.
How can I expand the VariableNames of my table keeping the values where necessary?