Clear Filters
Clear Filters

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

1 view (last 30 days)
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 Comments
Muhammad Sohail Abid
Muhammad Sohail Abid on 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 on 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

Sign in to comment.

Answers (0)

Categories

Find more on Particle & Nuclear Physics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!