I am working with Galois field. I obtained all the 256 values, and now i want to make the matrix form of the obtained values.
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
clear all;
close all;
clc;
m = 8;
p = 2;
prim_poly = p^8+p^6+p^5+p^1+p^0;
a = gf(35, m, prim_poly);
b = gf(15, m, prim_poly);
c = gf(0, m, prim_poly);
d = gf(5, m, prim_poly);
x_gf = gf([a b; c d] , m , prim_poly);
determinant = det(gf(x_gf, m, prim_poly));
% Check singularity
if determinant == 0
disp('The linear fractional transformation is singular.');
else
disp('The linear fractional transformation is not singular.');
end
%s = zeros(1,256);
for x_gf = 0:255
e = conv(a, x_gf);
f = conv(c, x_gf);
h = e + b;
j = f + d;
i = gf(1./j, m, prim_poly);
results = gf(conv(h, i),m, prim_poly)
end
0 comentarios
Respuestas (2)
Fangjun Jiang
el 30 de Ag. de 2023
results = zeros(1,256);
for x_gf = 0:255
e = conv(a, x_gf);
f = conv(c, x_gf);
h = e + b;
j = f + d;
i = gf(1./j, m, prim_poly);
results(x_gf+1) = gf(conv(h, i),m, prim_poly)
end
1 comentario
Voss
el 30 de Ag. de 2023
clear all;
close all;
clc;
m = 8;
p = 2;
prim_poly = p^8+p^6+p^5+p^1+p^0;
a = gf(35, m, prim_poly);
b = gf(15, m, prim_poly);
c = gf(0, m, prim_poly);
d = gf(5, m, prim_poly);
x_gf = gf([a b; c d] , m , prim_poly);
determinant = det(gf(x_gf, m, prim_poly));
% Check singularity
if determinant == 0
disp('The linear fractional transformation is singular.');
else
disp('The linear fractional transformation is not singular.');
end
%s = zeros(1,256);
results = zeros(1,256);
for x_gf = 0:255
e = conv(a, x_gf);
f = conv(c, x_gf);
h = e + b;
j = f + d;
i = gf(1./j, m, prim_poly);
results(x_gf+1) = gf(conv(h, i),m, prim_poly)
end
Voss
el 30 de Ag. de 2023
clear all;
close all;
clc;
m = 8;
p = 2;
prim_poly = p^8+p^6+p^5+p^1+p^0;
a = gf(35, m, prim_poly);
b = gf(15, m, prim_poly);
c = gf(0, m, prim_poly);
d = gf(5, m, prim_poly);
x_gf = gf([a b; c d] , m , prim_poly);
determinant = det(gf(x_gf, m, prim_poly));
% Check singularity
if determinant == 0
disp('The linear fractional transformation is singular.');
else
disp('The linear fractional transformation is not singular.');
end
%s = zeros(1,256);
results = cell(1,256);
for x_gf = 0:255
e = conv(a, x_gf);
f = conv(c, x_gf);
h = e + b;
j = f + d;
i = gf(1./j, m, prim_poly);
results{x_gf+1} = gf(conv(h, i),m, prim_poly);
end
disp(results);
results{1}
results{2}
0 comentarios
Ver también
Categorías
Más información sobre Model References en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!