Calculation of far-field radiation pattern using nonuniformly spaced antennas by a least square method