Javascript Array Contains Function Matlab