Borrar filtros
Borrar filtros

mapping elliptic curve on Matlab and writing points in form of a table of m*n order

1 visualización (últimos 30 días)
I am trying to map elliptic curve on Matlab using the following code and I get all the points issue is that firstly I have to neglect all repeating points of x-values and then I have to write points in form of a 2D table of 256 rows and 482 columns and we have to fill the remaining entries to pad up with zero
disp('y^2 = x^3 + 5376x + 2438 mod 123457')
a=0:123456
left_side = mod(a.^2,123457)
right_side = mod(a.^3+5376*a+2438,123457)
points = [];
for i = 1:length(right_side)
I = find(left_side == right_side(i));
for j=1:length(I)
points = [points;a(i),a(I(j))];
end
end
plot(points(:,1),points(:,2),'ro')
set(gca,'XTick',0:1:123456)
set(gca,'YTick',0:1:123456)
grid on;
  3 comentarios
Muhammad Sohail Abid
Muhammad Sohail Abid el 3 de Jul. de 2018
disp('y^2 = x^3 + 5376x + 2438 mod 123457')
a=0:123456
left_side = mod(a.^2,123457)
right_side = mod(a.^3+5376*a+2438,123457)
points = [];
for i = 1:length(right_side)
I = find(left_side == right_side(i));
for j=1:length(I)
points = [points;a(i),a(I(j))];
end
end
plot(points(:,1),points(:,2),'ro')
set(gca,'XTick',0:1:123456)
set(gca,'YTick',0:1:123456)
grid on;
Muhammad Sohail Abid
Muhammad Sohail Abid el 3 de Jul. de 2018
question is to find elliptic curve poi ts and write them in form of a table of 256 rows and multiple columns

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Particle & Nuclear Physics 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