created the state vector array, saved it to all_states.mat, and cleaned up code in marble_detection