Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
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 commentaires
Muhammad Sohail Abid
Muhammad Sohail Abid le 3 Juil 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 le 3 Juil 2018
question is to find elliptic curve poi ts and write them in form of a table of 256 rows and multiple columns

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Particle & Nuclear Physics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by