Skip to Main Content Skip to Search
Product Documentation

isprimitive - True for primitive polynomial for Galois field

Syntax

isprimitive(a) 

Description

isprimitive(a) returns 1 if the polynomial that a represents is primitive for the Galois field GF(2m), and 0 otherwise. The input a can represent the polynomial using one of these formats:

Examples

The example below finds all primitive polynomials for GF(8) and then checks using isprimitive whether specific polynomials are primitive.

a = primpoly(3,'all','nodisplay'); % All primitive polys for GF(8)

isp1 = isprimitive(13) % 13 represents a primitive polynomial.

isp2 = isprimitive(14) % 14 represents a nonprimitive polynomial.

The output is below. If you examine the vector a, notice that isp1 is true because 13 is an element in a, while isp2 is false because 14 is not an element in a.

isp1 =

     1


isp2 =

     0

See Also

primpoly

How To

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS