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일

0 개 추천

out = regexp(A,'\w{2}\d{1}','match')

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

질문:

2014년 5월 19일

댓글:

2014년 5월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by