function M = remove_unreachable(M) % removes the unreachable states of M % see str2dfsa.m for basic dfsa definitions % see str2nfsa.m for basic nfsa definitions R = reachable_states(M); %R = union(R,[M.q0]); M.Q = R; M.F = intersect(M.F,R); M = compact_names(M); return