Create text variable from one other
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have created a text variable as;
Text = "Alex"
and I want to create an other text varible with every second letter of the "Text" varible(Alex). How can I do it?
0 Kommentare
Akzeptierte Antwort
Chunru
am 30 Aug. 2022
% Use char array
Text = "Alex"
Text1 = char(Text);
Text2 = string(Text1(1:2:end))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Text Data Preparation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!