function A = SymBand2Sparse (ABand)

[n,ib] = size (ABand) ;
nelem  = 0 ;

for i=1:n
    for j=1:ib
        if ABand(i,j) ~= 0.  nelem = nelem+1 ; end
    end
end
nelem = nelem*2 - n ;

AA   = zeros (nelem,1) ;
ipos = zeros (nelem,1) ;
jpos = zeros (nelem,1) ;

ielem = 1 ;
for i=1:n
    for j=1:ib
        if ABand(i,j) ~= 0.
            AA  (ielem) = ABand(i,j) ;
            ipos(ielem) = i ;
            jpos(ielem) = i+j-1 ;
            ielem = ielem + 1 ;
            if j > 1
               AA  (ielem) = ABand(i,j) ;
               ipos(ielem) = i+j-1 ;
               jpos(ielem) = i ;
               ielem = ielem + 1 ;
            end
        end
    end
end
A = sparse (ipos , jpos , AA , n , n) ;