フィルターのクリア

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

1 回表示 (過去 30 日間)
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 件のコメント
Muhammad Sohail Abid
Muhammad Sohail Abid 2018 年 7 月 3 日
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 2018 年 7 月 3 日
question is to find elliptic curve poi ts and write them in form of a table of 256 rows and multiple columns

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeParticle & Nuclear Physics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by