Hi, Jayanthi:
I am not quite sure about your question "... but while taking measurement after fabricating the antenna how to test the gain at phi=40deg .please ex[plain me...". In my understanding, simulation and measurement are similar. You can get their pattern data. You can find the maximum. If you calibrate your equipment correctly, you can find out the gain. On simulation, there is no calibration involved. We are able to find the total radiated power and the power density. From there, we are able to find the gain. Regards.