Some important benefits of exercising after a heart attack can vanish in weeks if the exercise is stopped, a new study has found.

The researchers tested F.M.D.  flow-mediated dilation, a measure of the flexibility of an artery as blood flows through it  in 228 heart attack survivors. Their arteries averaged about 4.2 percent expansion, compared with the 10 percent considered normal in healthy people.

Then the scientists divided patients into four groups to undergo resistance training, aerobic exercise, both together, or no exercise program at all.

Finally, the exercisers “detrained,” remaining idle for four weeks.

The study, published in the March 16 issue of the journal Circulation, found that the dilation had increased to 5.3 percent in the people who had not exercised, but to an average of more than 10 percent in the training groups. After four weeks of detraining, dilation returned to almost exactly the initial levels in all three exercise groups.