How to find string value?

1 次查看(过去 30 天)
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')

更多回答(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