How about this:
ca = cell({'pants','scarf','heels','shoes'; true,false,true,true; true,true,false,true}) for col = 1 : size(ca, 2) if ca{2, col} & ca{3, col} fprintf('You should wear the %s.\n', ca{1, col}); else fprintf('You should not wear the %s.\n', ca{1, col}); end end
gives:
ca = 'pants' 'scarf' 'heels' 'shoes' [ 1] [ 0] [ 1] [ 1] [ 1] [ 1] [ 0] [ 1] You should wear the pants. You should not wear the scarf. You should not wear the heels. You should wear the shoes.