source: git/Tst/Manual/errorInsert.tst

spielwiese
Last change on this file was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 426 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "decodegb.lib";
3//correct 2 errors in [7,3] 8-ary code RS code
4int t=2; int q=8; int n=7; int redun=4;
5ring r=(q,a),x,dp;
6matrix h_full=genMDSMat(n,a);
7matrix h=submat(h_full,1..redun,1..n);
8matrix g=dual_code(h);
9matrix x[1][3]=0,0,1,0;
10matrix y[1][7]=encode(x,g);
11print(y);
12//disturb with 2 errors
13matrix rec[1][7]=errorInsert(y,list(2,4),list(1,a));
14print(rec);
15print(rec-y);
16tst_status(1);$
Note: See TracBrowser for help on using the repository browser.