フィルターのクリア

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 Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by