필터 지우기
필터 지우기

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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by