function h1=lanczos(ns,om) ns2=2*ns; H0=om/pi; con=2.0*pi/(ns2+1); i=1:ns; omt=i*om; omc=i*con; h=(H0*sin(omt)./(omt)).*(sin(omc)./(omc)); tot=H0+2*sum(h); H0=H0/tot; h=h/tot; h1(1:ns)=h(ns:-1:1); h1(ns+1)=H0; h1(ns+2:2*ns+1)=h;