find element egual to substring in array string
조회 수: 1 (최근 30일)
이전 댓글 표시
c=["A1_asd";"A2_rrd";"A_dj";"B1_gre";"B2_rffe";"B3_rffe"]
%i want to catch string before letter_ and search member
%find all member egual to A in c;
%find all member egual to B in c;
result:
["A1_asd";"A2_rrd";"A_dj"]
["B1_gre";"B2_rffe";"B3_rffe"]
댓글 수: 0
채택된 답변
Dyuman Joshi
2023년 11월 21일
From what I understood of the given information -
%Input
c=["A1_asd";"A2_rrd";"A_dj";"B1_gre";"B2_rffe";"B3_rffe"]
%Output
a = c(startsWith(c, 'A'))
b = c(startsWith(c, 'B'))
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!