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.