Effacer les filtres
Effacer les filtres

finding lower case letters

2 vues (au cours des 30 derniers jours)
NUR KHAIRUNNISA rahimi
NUR KHAIRUNNISA rahimi le 9 Nov 2011
If I set x='sTring'
is there any possible way that I can detect the position of the upper case letter and add a number 'n' to it so that it'll change to letter to something else? thank you.

Réponses (1)

Daniel Shub
Daniel Shub le 9 Nov 2011
x = 'aStringWithCamelCaseThatHasSomeCapitalLetters';
y = x;
z = x;
y(ismember(x, 'A':'Z')) = '?'
or
z(ismember(x, 'A':'Z')) = x(ismember(x, 'A':'Z'))+1

Catégories

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by