I have two character arrays, F='(AB'')+(BC)+(C)' and G='(BC'')+(C)+(AB)'. How can I compare all the terms of G to determine if it exist in F?

답변 (1개)

Walter Roberson
Walter Roberson 2020년 3월 8일

0 개 추천

Fterms = regexp(F, '\+', 'split');
Gterms = regexp(G, '\+', 'split');
all(ismember(Gterms, Fterms))

카테고리

도움말 센터File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

질문:

2020년 3월 8일

답변:

2020년 3월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by