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

 채택된 답변

Paulo Silva
Paulo Silva 2011년 3월 26일

0 개 추천

a=[0 0] %example input
b=[a(1) a(2) xor(a(1),a(2))] %example output

댓글 수: 3

mahaveer hanuman
mahaveer hanuman 2011년 3월 29일
yes how can write that for for several bits
Paulo Silva
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))
mahaveer hanuman
mahaveer hanuman 2011년 4월 24일
thanks

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Big Data Processing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by