Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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 Kommentare
Muhammad Sohail Abid
Muhammad Sohail Abid am 3 Jul. 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 am 3 Jul. 2018
question is to find elliptic curve poi ts and write them in form of a table of 256 rows and multiple columns

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Particle & Nuclear Physics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by