Hey guys, I have to do a cell array to strore some information about an animal and use a for loop to display that information and the result should look like this:
Identification number: 1 Gender: M Weight: 400 Age: 4 Treatment: 0
I've tried many thing and I dont get how to have to columns. This is what i've tried.
rat_cell = {'number', 'sex', 'weight', 'age', 'treatment', 1, 'M', 400, 4, 0}; for i = 1:5disp(rat_cell(i,:)) for j = 1:5 disp (rat_cell (j,:)); end end
I dont get why it doesnt show 2 columns like its supposed to. Thanks
Best Answer