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 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (2)
Fangjun Jiang
il 30 Ago 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 Commento
Voss
il 30 Ago 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
il 30 Ago 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 Commenti
Vedere anche
Categorie
Scopri di più su Model References in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!