フィルターのクリア

How to compare numeric strings

3 ビュー (過去 30 日間)
pamela sulis
pamela sulis 2015 年 11 月 25 日
コメント済み: pamela sulis 2015 年 11 月 25 日
have a problem to find the similarity of two patterns. I use LCS of this two pattern to represent their longest common part. For example given a pattern
P='012(32)231(43)'
and a pattern
Q='231(43)40(12)321'
their longest common sequence is
LCS(P,Q)= '0,1,2,3,4,(43)'
I want to find similarity of 106 strings in a cell array. The common elements are the number (0,1,2,3,4) or couples of number that both strings have (43). I have a lot of difficultes: I have no idea, I can do it. I have found in MATLAB functions like strcmp, strcmpi, strncmp, strncmpi, ismember but they are for strings of same size; I have thought about using regexp but I don't know how. I have read other questions about compare strings but none appears to address this problem. Can you give me suggestions?
  4 件のコメント
Walter Roberson
Walter Roberson 2015 年 11 月 25 日
Are you looking for common subsequences or common substrings?
pamela sulis
pamela sulis 2015 年 11 月 25 日
I'm looking for substrings

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2015 年 11 月 25 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by