필터 지우기
필터 지우기

Is there a command for/how to convert a binary number to binary vector?

조회 수: 4 (최근 30일)
Hi,
I got a binary number and i want to convert it to a binary vector like;
a=101010101010101010 to [1 0 1 0 1 0 1 0 ....]

채택된 답변

Oleg Komarov
Oleg Komarov 2012년 8월 3일
a = '101010101010101010';
a = a - '0';

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 8월 3일
b=num2str(a);c=b(:);
result=str2num(c)'

카테고리

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