See if this works for you. Remember that Matlab (I I think, therefore, the Math Node) uses 1 based array indecies. Can somebody verify that for me? Anyways, that's why the +1 is missing.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5