XOR operation

7 visualizzazioni (ultimi 30 giorni)
mahaveer hanuman
mahaveer hanuman il 26 Mar 2011
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

Risposta accettata

Paulo Silva
Paulo Silva il 26 Mar 2011
a=[0 0] %example input
b=[a(1) a(2) xor(a(1),a(2))] %example output
  3 Commenti
Paulo Silva
Paulo Silva il 29 Mar 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))
mahaveer hanuman
mahaveer hanuman il 24 Apr 2011
thanks

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Big Data Processing in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by