XOR operation
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Paulo Silva
am 26 Mär. 2011
a=[0 0] %example input
b=[a(1) a(2) xor(a(1),a(2))] %example output
3 Kommentare
Paulo Silva
am 29 Mär. 2011
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))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Big Data Processing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!