필터 지우기
필터 지우기

how catch number in "()"

조회 수: 2 (최근 30일)
piero
piero 2023년 9월 19일
편집: Voss 2023년 9월 19일
f={"1A(12)","cB(34)","4C(23)"}
i want catch array with 12 34 and 23

채택된 답변

Voss
Voss 2023년 9월 19일
편집: Voss 2023년 9월 19일
f={"1A(12)","cB(34)","4C(23)"};
C = regexp(cellstr(f),'\((.*)\)','tokens','once');
C = [C{:}]
C = 1×3 cell array
{'12'} {'34'} {'23'}
N = str2double(C)
N = 1×3
12 34 23

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by