Macaulay2 » Documentation
Packages » CodingTheory » LinearCode » ambientSpace » field
next | previous | forward | backward | up | index | toc

# field -- the field of a code

- Usage:
    `field (C)`
- Inputs:
  - C, an instance of the type LinearCode,
- Outputs:
  - a ring,

## Description

Given a code C, returns the field (or ring) that contains the entries of the generator matrix of C.

    i1 : F=GF(4,Variable=>a);

    i2 : C=linearCode(matrix{{1,a,0},{0,1,a}});

    i3 : field C

    o3 = F

    o3 : GaloisField

## Ways to use field:

- `field(LinearCode)`

## For the programmer

The object field is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/CodingTheory.m2:4157:0.