I have a table, and I want to populate every row in a specific column with the same string. I keep getting errors. Using Matlab R2018a, no fancy packages.
mytable = nan(5,2); % I'm creating my table like this; it's actually much bigger, and most of the columns are numerical
% is there a better way to do this? the order of the column matters, and I don't want to have to add extra code to re-order
mytable = array2table(mytable);mytable.Properties.VariableNames = {'colA', 'colB'};mytable.colA(:) = 459; % just a random number, proof-of-concept that it works
mytable.colB(:) = {'words'}; % this throws errors
Best Answer