0

I want to do some basic operations on finite fields, such as finding the greatest common factor of two polynomials, factoring polynomials, etc. I find few results on google. I'm new to matlab, doesn't matlab have a convenient function like the c++ NTL number theory library?

tom
  • 1
  • 1

1 Answers1

0

You can do basic operations of course. To compute the greatest common divisor of polynomials you can use the "gcd" function. To factorize polynomials you can use "factor".

Example 1 - GCD:

syms x
poly_gcd = gcd(x^3 - 3*x^2 + 3*x - 1, x^2 - 5*x + 4);

Example 2 - Factor:

syms x
poly_fact = factor(x^3 + 2, x, 'FactorMode', 'real');
Alesof
  • 321
  • 2
  • 8