用Matlab将字符串转换成数组

大哥们帮我教一下,用Matlab将字符串转换成数组
最新回答
草莓少女自然甜

2024-04-19 14:28:35

>> S = '0023100'

S =

0023100

>> A = str2num(S(:))'

A =

0 0 2 3 1 0 0

>>
绝命小红帽

2024-04-19 08:34:15

>>
S
=
'0023100'
S
=
0023100
>>
A
=
str2num(S(:))'
A
=
0
0
2
3
1
0
0
>>