replaceing a specific character in a cell array of strings

12 vues (au cours des 30 derniers jours)
FATEMEH
FATEMEH le 10 Mai 2012
I have a cell array of {'12034' '10045' '24000' } I need to replace all the third characters by '.'. so I need {'12.34' '10.45' '24.00' }. thanks

Réponses (1)

Walter Roberson
Walter Roberson le 10 Mai 2012
cellfun(@(S) [S(1:2) '.' S(4:end)], YourCell, 'Uniform', 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