XOR operation

8 visualizaciones (últimos 30 días)
mahaveer hanuman
mahaveer hanuman el 26 de Mzo. de 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

Respuesta aceptada

Paulo Silva
Paulo Silva el 26 de Mzo. de 2011
a=[0 0] %example input
b=[a(1) a(2) xor(a(1),a(2))] %example output
  3 comentarios
Paulo Silva
Paulo Silva el 29 de Mzo. de 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 el 24 de Abr. de 2011
thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Big Data Processing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by