Find the exact match of a string from a cell array.

1 回表示 (過去 30 日間)
sc1991
sc1991 2018 年 12 月 11 日
回答済み: sc1991 2018 年 12 月 11 日
Hi! this looks to be easy but somehow its not working for me. So here is the problem statement, I have a cell array with all the parameters name
Parameter ={name_1000ms
name2_1000ms
name3_1000msCD
name4_200ms};
now i just want to extarct name_1000ms and name2_1000ms basically when i do strcmp for 1000ms i just want it to pull all the parameter name that has exact match of 1000ms and not 1000msCD.
  1 件のコメント
sc1991
sc1991 2018 年 12 月 11 日
Hello! I just wanted to update I found a quick solution to the above problem there is a function endsWith that works really well in my case. But i am still wondering if there is any other way that we can do. For now endsWith seems to have worked perfectly for me.
Please feel free to post your responses as well.Thanks

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

採用された回答

sc1991
sc1991 2018 年 12 月 11 日
Hello! I just wanted to update I found a quick solution to the above problem there is a function endsWith that works really well in my case. But i am still wondering if there is any other way that we can do. For now endsWith seems to have worked perfectly for me.
Please feel free to post your responses as well.Thanks

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by