how to convert a string contains number seperated by commas into a matrix of numbers

5 vues (au cours des 30 derniers jours)
if a string s='6,7,8,9,19' how can i convert it as matrix=[6 7 8 9 19]

Réponse acceptée

KSSV
KSSV le 24 Oct 2016
Modifié(e) : KSSV le 24 Oct 2016
s='6,7,8,9,19' ;
matrix = str2num(s);

Plus de réponses (0)

Catégories

En savoir plus sur Numeric Types dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by