I'm not really sure what you said. It's not understandable to me. Perhaps are you saying that you need to interpolate and find fractional indexes because you're giving values that don't exist in T? If so, I don't think this is what you were saying in the beginning. But if so, perhaps you need to look into interp2().