How to a='10101111' convert array b=[1,0,1,0,1,1,1,1]

답변 (2개)

Bruno Luong
Bruno Luong 2020년 12월 18일
>> a='10101111'
a =
'10101111'
>> a-'0'
ans =
1 0 1 0 1 1 1 1
Subhadeep Koley
Subhadeep Koley 2020년 12월 18일
편집: Subhadeep Koley 2020년 12월 18일
charArray = '10101111';
newCharArray = double((charArray == '1'));

카테고리

도움말 센터File Exchange에서 Powertrain Blockset에 대해 자세히 알아보기

태그

질문:

2020년 12월 18일

댓글:

2020년 12월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by