Home » All Programs » Factorization With ‘factor()’ Command In MatLab®

Factorization With ‘factor()’ Command In MatLab®

Symbolic operations are very useful in Matlab®. You can do factorization operations in Matlab® if you know how to define your equation or polynomial in Matlab® as a symbolic expression.

Take a look at the examples below that are executed in the Matlab® command window to understand factorization. 

YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!

How To Use ‘factor()’ Command In MatLab®?

>> syms x
a = factor(x^2-3*x+2)
a =
[ x - 1, x - 2]

You can see an example of the use of the factor()’ command in Matlab® above. We created a symbolic variable ‘x’ with the ‘syms’ command. Then we directly typed our polynomial equation into the ‘factor()’ command. 

As an answer, you can see the two roots of our equation. 


Here you can see that, the use of the factor()’ command in Matlab® for factorization operations is very easy. 

Do not forget to leave your comments and questions below about the use of the factor() command for factorizations in Matlab® below. 

If you want further coding examples about ‘sym’ and ‘syms’ commands in Matlab®, inform us in the comments.

This article is prepared for completely educative and informative purposes.

Your precious feedbacks are very important to us.


Leave a Reply

Your email address will not be published. Required fields are marked *


leave feedback ?

( For the post )



We are always open to your feedback to improve ourselves and the quality of our content! If you have any suggestions, thoughts, or criticism, please let us know. We are trying to improve our blog with constructive feedback. We are aware of how valuable your feedback is for our future development, and we will carefully read all your comments. Thank you in advance!