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

조회 수: 3 (최근 30일)
if a string s='6,7,8,9,19' how can i convert it as matrix=[6 7 8 9 19]

채택된 답변

KSSV
KSSV 2016년 10월 24일
편집: KSSV 2016년 10월 24일
s='6,7,8,9,19' ;
matrix = str2num(s);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by