Multiplication and xor binary matrix

30 visualizaciones (últimos 30 días)
Mohammed Alhamiri
Mohammed Alhamiri el 28 de Abr. de 2021
Comentada: Mohammed Alhamiri el 3 de Mayo de 2021
Hello,
I want to get
mc=[0 1 1 0] [ 1111 1111; 1111 0000; 1100 1100; 1010 1010]
the answer shuld be [00111100]
How to do that please ?

Respuestas (1)

Walter Roberson
Walter Roberson el 28 de Abr. de 2021
Editada: Walter Roberson el 28 de Abr. de 2021
A = [0 1 1 0]
A = 1×4
0 1 1 0
B =[ 1 1 1 1 1 1 1 1; 1 1 1 1 0 0 0 0; 1 1 0 0 1 1 0 0; 1 0 1 0 1 0 1 0]
B = 4×8
1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0
mod(A*B,2)
ans = 1×8
0 0 1 1 1 1 0 0
Ag = gf(A,1)
Ag = GF(2) array. Array elements = 0 1 1 0
Bg = gf(B,1)
Bg = GF(2) array. Array elements = 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0
Ag*Bg
ans = GF(2) array. Array elements = 0 0 1 1 1 1 0 0

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by