필터 지우기
필터 지우기

how can I convert a binary matrix to a linear data?

조회 수: 51 (최근 30일)
Vishnu M S
Vishnu M S 2013년 1월 16일
I have a matrix A of size 3X2. Where A(1,1)=1, A(1,2)=0, A(2,1)=1, A(2,2)=1, A(3,1)=0, A(3,2)=1. I need the data in linear array like 1 0 1 1 0 1 please help me...

채택된 답변

Pedro Villena
Pedro Villena 2013년 1월 16일
편집: Pedro Villena 2013년 1월 17일
reshape(A',1,[])
  댓글 수: 1
Jan
Jan 2013년 1월 16일
편집: Jan 2013년 1월 16일
Now correct with the transposition.
Equivalent:
reshape(A.', 1, [])
or:
B = B.';
B = B(:).'

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by