shobhit - you don't say what is wrong with your above code (please do in the future) but if you wish to continue using the loop as above then you should define your CO2E array as a cell array and update it as
CO2E = {};
for mm = 1:length(C)
CO2E{mm} = CO2(C{mm});
end
It is very similar to what you had, though from your above code, it is unclear why you are using dataind instead of C, and co2 instead of CO2.
An alternative to the above is to use arrayfun which we discussed in another post.