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 日

1 投票

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 件)

カテゴリ

ヘルプ センター および File ExchangeWrite C Functions Callable from MATLAB (MEX Files) についてさらに検索

質問済み:

2023 年 9 月 19 日

編集済み:

2023 年 9 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by