Technique for computing the response of a line of finite length excited by high frequency electromagnetic fields