  | #### D.10.2.9 errorRand Procedure from library `decodegb.lib` (see decodegb_lib). Usage: errorRand(y, num, e); y is matrix, num,e are int
                - y is a (code) word,
                - num is the number of errors,
                - e is an extension degree (if one wants values to be from GF(p^e))
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);
    //disturb with 2 random errors
    matrix rec[1][7]=errorRand(y,2,3);
    print(rec);
    ==> a3,a6,a2,a,0,0,1
    print(rec-y);
    ==> a4,0,a5,0,0,0,0

User manual for Singular version 4.4.1, 2025, generated by texi2html.