Converting a string array into a number array

6 vues (au cours des 30 derniers jours)
dzix design
dzix design le 13 Fév 2021
Commenté : dzix design le 13 Fév 2021
Please how can l convert '123456789' to [ 1 2 3 4 5 6 7 8 9] in MATLAB

Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 13 Fév 2021
Modifié(e) : KALYAN ACHARJYA le 13 Fév 2021
#Edited
num_str='123456789'
num_str - '0'
Result:
ans =
1 2 3 4 5 6 7 8 9
  7 commentaires
KALYAN ACHARJYA
KALYAN ACHARJYA le 13 Fév 2021
Yes sir @Jan Thanks, In day time, I have answered a similar question, which first required changing num2str, so I used it here by mistake.
Your teaching is very valuable, thank you and much appreciation
dzix design
dzix design le 13 Fév 2021
@jan thanks 🙏🏼

Connectez-vous pour commenter.

Plus de réponses (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