https://ch.mathworks.com/help/comm/ref/bchgenpoly.html
bchgenpoly - Produce generator polynomials for BCH code - MATLAB
This MATLAB function returns the narrow-sense generator polynomial of a BCH code with codeword length N and message length K.
producegeneratorpolynomialsbchcode