MATLAB: How to create a table and add elements to the table in MATLAB

add elementscreateMATLABtable

I want to create a 10X10 table and add elements to the table. Rows and columns both are having entries 1 2 3 4 5 6 7 8 9 10] and also for binary entries as [ 001; 010; 110; 101; 210; 220; 002; 202; 222; 111]
e.g. I want to add elements under all the pairs of rows and columns like (1,1) (1,2)………………………………………(10,1)……….. (10,10)
How can I add 'lambda' under these pairs of rows and columns using MATLAB?
Kindly tell
Regards
Surabhi

Best Answer

states = {'0', '1', '2', '3', '5', '6'};
rownames = states;
prefix = 't';
varnames = strcat({prefix}, states);
initial = repmat( {'lambda'}, 6, 6);
MyTable = mat2dataset(initial, 'VarNames', varnames, 'ObsNames', rownames);