In his earlier paper [Math. Numer. Sinica 11, No. 2, 128-131 (1989; Zbl 0687.65118
)] the author established a kind of three-level explicit difference scheme which is unconditionally stable for the Schrödinger equation with a constant coefficient. Here this is generalized to the problem $iU\sb t(x,t)-(a(x,t)U\sb x(x,t))\sb x=0$, $U(x,0)=U\sb 0(x)$, $U(0,t)=g\sb 0(t)$, $U(1,t)=g\sb 1(t)$, $a(x,t)>0$. The discrete energy method is used to justify. A numerical example is presented.