Group string based on charachter
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all If i have a string lets say a='1/23s' is there a way to take 1 and 23s seperately on some other variables so i can then extract only the numbers from them.
0 commentaires
Réponse acceptée
Chandra Kurniawan
le 7 Déc 2011
a='1/23s';
i = findstr(a,'/')
b = a(1:i-1)
c = a(i+1:end)
0 commentaires
Plus de réponses (1)
Andrei Bobrov
le 7 Déc 2011
str2double(regexp(a,'\d+','match'))
and
regexp(a,'/','split')
0 commentaires
Voir également
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!