How i can reading character letter by letter
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Gaseb Alotibi
le 18 Nov 2015
Réponse apportée : Gaseb Alotibi
le 21 Nov 2015
i have this variable x='123.56.128.117' as a char and i want to save each part that divided by '.' in a different variable. the problem is the size of each part is not fixed that why i face a problem. could you help me pls is there a function that can read the character and when it find '.' save or return size
0 commentaires
Réponse acceptée
Stephen23
le 20 Nov 2015
You can use regexp:
>> X = regexp('123.56.128.117','\.','split')
X =
123
56
128
117
0 commentaires
Plus de réponses (2)
Shruti Sapre
le 20 Nov 2015
Hi Gaseb,
Here are two functions that may help achieve the required result:
1. Using "strsplit":
2. Using "strtok"
Hope this helps!
-Shruti
0 commentaires
Voir également
Catégories
En savoir plus sur Startup and Shutdown 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!