Guest User

Untitled

a guest
Jun 5th, 2018
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.56 KB | None | 0 0
  1. exec('/mnt/media/work/vsu/Информационная защита/code/ellipse.sci');
  2.  
  3. p=751;
  4. a=-1;
  5. a=-1;
  6. G=[-1,1];
  7. nb=34;
  8. codeword=[
  9. [[618, 206], [426, 662]],
  10. [[72, 254], [67, 667]],
  11. [[286, 136], [739, 574]],
  12. [[16, 416], [143, 602]],
  13. [[618, 206], [313, 203]],
  14. [[618, 206], [114, 607]],
  15. [[618, 206], [438, 711]],
  16. [[188, 93], [573, 168]]
  17. ];
  18.  
  19. num=size(codeword); num=num(1);
  20. for pos=1:num
  21.   fst = codeword(pos,1:2);
  22.   snd = codeword(pos,3:4);
  23.   letter = sumpq(snd,minusp(multkp(nb,fst,p,a),p),p,a);
  24.   mprintf('(%i, %i), ',letter(1),letter(2));
  25. end
Add Comment
Please, Sign In to add comment