Effacer les filtres
Effacer les filtres

Sum of letters in matlab

25 vues (au cours des 30 derniers jours)
googo
googo le 15 Avr 2013
Asumming that I have a string = 'abcd'
and i want to sum 'a' and 'b' to be z = 'ab'... i guess a(1)+a(2) won't work...
so how can i do it?
basic thing to do but i'm new in matlab and just started to learn about strings.

Réponses (1)

Walter Roberson
Walter Roberson le 15 Avr 2013
string(1:2)
or
[string(1), string(2)]
or
horzcat(string(1), string(2))

Catégories

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

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by