No one tried to exclude the women. The soldiers wanted to exclude themselves from the public space. In the meantime soldiers were ordered not to eat in front of Muslims during Ramadan. A Jewish man is not allowed to listen to a woman singing. A Muslim is allowed to see someone else eat in the daytime during Ramadan. This isn't about women, but religious discrimination.
EU's Mogherini in Tehran to talk nuclear deal, regional issues (Reuters)