How to find string value?

2 vues (au cours des 30 derniers jours)
Akmyrat
Akmyrat le 19 Mai 2014
Commenté : Akmyrat le 19 Mai 2014
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.

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 19 Mai 2014
out = regexp(A,'\w{2}\d{1}','match')
  1 commentaire
Akmyrat
Akmyrat le 19 Mai 2014
Spasibo bolshoe Andrei..

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by