MATLAB: Is there any code or command to seperately display all the points of right_side = mod(a.^3+1​48*a+225,5​003); as defined in code given below

points seperation

I have a code for generating some elliptic curve points as
disp('y^2 = x^3 + 148x + 225 mod 5003')
a=0:5002
left_side = mod(a.^2,5003);
right_side = mod(a.^3+148*a+225,5003);
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
this codes gives us points as
(0,15) (0,4988) (2,23) (2,4980) (3,88) (3,4122) …
i want to extract (pick out an array of numbers ) as [15 4988 23 4980 88 4122 …..]

Best Answer

points(:,2).'