lookup function

Find value corresponding to the input vector using a look-up table