No one knows precisely how many students were forced to leave the military academies. Officials at the Air Force Academy and at West Point said none were expelled. Officials at the Naval Academy said they did not keep track. There is little doubt that the law, and the largely conservative culture at the military institutions, made the academies an inhospitable environment for gay students, professors at the Air Force Academy and West Point said.

Morten G. Ender, a sociology professor at West Point who surveyed students at the Air Force Academy and West Point, found that 49 percent of freshmen favored barring gays from serving in 2007. Professor Ender said he believes, however, that attitudes have been gradually shifting since then.

“What we’re seeing is increased tolerance,”’ said Professor Ender, who is updating his study.

Many gay students, however, feared the worst as the repeal date approached in September 2011. But Andrew Fitzimmons, the president of the Spectrum Club at West Point, said students had adapted to the repeal with little fuss or fanfare.

Colonel Gary A. Packard Jr., who directs the Department of Behavioral Science and Leadership at the Air Force Academy and co-wrote a recent report on the effect of the repeal on the armed services, said that the transition has gone remarkably well at the military academies.

“Are there still pockets of resistance? Absolutely,” said Colonel Packard, who said that some older staff members and retirees would prefer to see openly gay students barred from the academies.

“But we hear more stories about the positive,” he said. “Cadets have a more open dialogue with each other because it’s now safe to have the conversation. You don’t see a great big coming-out-of-the-closet party. But what you do see is the ability to have a conversation that you couldn’t have before. That’s an important step.”