matlab check if variable exists in array