フィルターのクリア

Group string based on charachter

2 ビュー (過去 30 日間)
Raldi
Raldi 2011 年 12 月 7 日
Hi all If i have a string lets say a='1/23s' is there a way to take 1 and 23s seperately on some other variables so i can then extract only the numbers from them.

採用された回答

Chandra Kurniawan
Chandra Kurniawan 2011 年 12 月 7 日
a='1/23s';
i = findstr(a,'/')
b = a(1:i-1)
c = a(i+1:end)

その他の回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2011 年 12 月 7 日
str2double(regexp(a,'\d+','match'))
and
regexp(a,'/','split')

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by