map from cont loc to disc state, matlab