function newC = addValue(coll) % add a filed named value to each CD % value = stars / price N = length(coll) for index = 1:N cd = coll(index); prc = cd.price; if prc < .1 prc = .1; end cd.value = cd.stars / prc; newC(index) = cd; end