How to get the factor format of a polynomial
262 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Moisés Antonio Fonseca Beltrán
am 17 Apr. 2021
Kommentiert: Alan Stevens
am 18 Apr. 2021
Hi,
I want to get the factorized format of a symbolic polynomial.
I know how to get the factors in symbolic way:
syms x
factor(x.^2-1)
ans =
[ x - 1, x + 1]
This is an array with factors.
But, I want to get as answer something like
(x - 1)*(x + 1)
how could I get it? I remember in ancient versions this was the result.
Do I have to build this expression?
In this case, any sugestion in order to make it?
Thanks in advance.
0 Kommentare
Akzeptierte Antwort
Alan Stevens
am 17 Apr. 2021
syms x
y=x^2-1;
a = factor(y)
b = a(1)*a(2)
2 Kommentare
Moisés Antonio Fonseca Beltrán
am 17 Apr. 2021
Bearbeitet: Moisés Antonio Fonseca Beltrán
am 17 Apr. 2021
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Polynomials finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!