This paper presents the design of a tree sections corrugated horn antenna with a modified linear profile, using NURBS, suitable for radio-astronomy applications. The operating band ranges from 4.5 to 8.8 GHz. The aperture efficiency is higher than 84% and the return losses are greater than 20 dB in the whole bandwidth. The antenna optimization has been carried out with multiobjective versions of an evolutionary algorithm (EA) and a particle swarm optimization (PSO) algorithm. We show that both techniques provide good antenna design, but the experience carried out shows that the results of the evolutionary algorithm outperform the particle swarm results.