XOR operation
조회 수: 21 (최근 30일)
이전 댓글 표시
input=output
[0 0]=[0 0 0] [0 1]=[0 1 1] [1 0]=[1 0 1] [1 1]=[1 1 0]
how can i get this
댓글 수: 0
채택된 답변
Paulo Silva
2011년 3월 26일
a=[0 0] %example input
b=[a(1) a(2) xor(a(1),a(2))] %example output
댓글 수: 3
Paulo Silva
2011년 3월 29일
a=[ 0 0; 0 1 ; 1 0 ; 1 1]
c=zeros(size(a,1),3);
c(:,1:2)=a;
b=1:size(a,1);
c(b,3)=xor(a(b,1),a(b,2))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Big Data Processing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!