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 CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by