I use it frequently and it works fine. Thanks
1 thing to mention - the following sentence
'If the values in 'var' are outside the range of 'x' then either 1 or length(x) are returned as indices for those values.'
is not included in M-file help text (first few lines description). So if you download this function, do not use it for some time and forget about this then you may be surprised using it and getting many ones or 'x' lengths. Reading M-file description does not help in this case. You have to analyze code or go to the website.
This is a minor thing, of course.