필터 지우기
필터 지우기

Convert string form to array form on Matlab

조회 수: 2 (최근 30일)
hang dong
hang dong 2019년 5월 29일
답변: Jan 2019년 5월 29일
How to convert string form into array and from array to string on Matlab?
exam : '1234' ---> [1 2 3 4]
[1 2 3 4] --> '1234'

답변 (2개)

madhan ravi
madhan ravi 2019년 5월 29일
sprintf('%d',1234)
str2double('1234')

Jan
Jan 2019년 5월 29일
[1 2 3 4] --> '1234' :
x = [1,2,3,4]
s = sprintf('%d', x)
'1234' ---> [1 2 3 4] :
s = '1234';
x = s - '0'

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by