Singular Manual: errorInsert

  | #### D.10.2.8 errorInsert Procedure from library `decodegb.lib` (see decodegb_lib). Usage: errorInsert(y,pos,val); y is matrix, pos,val are list of int's
              - y is a (code) word,
              - pos = positions where errors occurred,
              - val = their corresponding values
Return: corresponding received word Example:
    LIB "decodegb.lib";
    //correct 2 errors in [7,3] 8-ary code RS code
    int t=2; int q=8; int n=7; int redun=4;
    ring r=(q,a),x,dp;
    matrix h_full=genMDSMat(n,a);
    matrix h=submat(h_full,1..redun,1..n);
    matrix g=dual_code(h);
    matrix x[1][3]=0,0,1,0;
    matrix y[1][7]=encode(x,g);
    print(y);
    ==> a6,a6,a3,a,0,0,1
    //disturb with 2 errors
    matrix rec[1][7]=errorInsert(y,list(2,4),list(1,a));
    print(rec);
    ==> a6,a2,a3,0,0,0,1
    print(rec-y);
    ==> 0,1,0,a,0,0,0

User manual for Singular version 4-1-1p3, 2018, generated by texi2html.