(CNN) Less-expensive, easier-to-prepare ultraprocessed foods can make you fat, a new study says.

foods ate more calories and gained more weight than when their diet mostly consisted of minimally processed foods, finds the People limited to a diet of primarily highly processedfoods ate more calories and gained more weight than when their diet mostly consisted of minimally processed foods, finds the study, published Thursday in the journal Cell Metabolism.

This small-scale study is the first randomized controlled trial -- considered the gold standard in science -- examining the effects of ultraprocessed foods. They are defined as containing industrial ingredients, such as hydrogenated oils, high-fructose corn syrup, flavoring agents and emulsifiers.

During a one-month study, 20 healthy adult volunteers stayed at the National Institutes of Health Clinical Center, where all their meals were provided to them. For 14 days in turn, they were limited to each diet and told they could eat as much or as little as they liked.

The two versions of meals had the same amounts of calories, sugars, fiber, fat and carbohydrates. For example, the unprocessed breakfast might be oatmeal with bananas, walnuts and skim milk, while the other consisted of a bagel with cream cheese and turkey bacon.