How to find string value?

2 ビュー (過去 30 日間)
Akmyrat
Akmyrat 2014 年 5 月 19 日
コメント済み: Akmyrat 2014 年 5 月 19 日
Lets say i have a matrix in form of string A=['AN1OR1OU1'], And I want to find values separately as AN1, OR1, OU2, i tried this lets say a1= (1:3) it shows result as a1 = 1 2 3, but I want that it show result as a1=AN1. Please give some advice.

採用された回答

Andrei Bobrov
Andrei Bobrov 2014 年 5 月 19 日
out = regexp(A,'\w{2}\d{1}','match')
  1 件のコメント
Akmyrat
Akmyrat 2014 年 5 月 19 日
Spasibo bolshoe Andrei..

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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