{Index exceeds array bounds.
Error in pANFOG (line 1284)
        maxdist_all=cat(1,maxdist_all,sb.maxdist(j));}