Info

This question is closed. Reopen it to edit or answer.

elliptic points as cell

1 view (last 30 days)
sadiqa ilyas
sadiqa ilyas on 19 Aug 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
I want to convert elliptic curve points as cell
a=0:66;
left_side = mod(a.^2,67);
right_side = mod(a.^3+1*a-3,67);
C={};
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))];
C={points}
end
end
C=mat2cell(points)% all points
I dont know whats wrong with this
  1 Comment
Joel Handy
Joel Handy on 19 Aug 2019
Can you tell us exactly what doesnt work. Its generally very useful to give a statement like, "I expect ..., but what I'm getting is ...".
running the code, I get teh pretty clear error, "Undefined function or variable points." You are trying to concatinate the variable points before it exists. You need to define points before your loops.
points = [];
I suspect there are more issues but we'll need more information before I can help further.

Answers (0)

Community Treasure Hunt

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

Start Hunting!