function m = myslope( iv, ind, off )
    m = (iv(ind+off) - iv(ind-off)) / (2*off);