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?
Asked
Active
Viewed 36 times
1 Answers
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
-
this func is not for finite field. – tom Apr 16 '23 at 03:00