Factorization of Algebraic Expressions
The factor function factorizes an expression. The following example demonstrates the concept:
Example
Create a script file and type the following code:
syms x
syms y
factor(x^3 - y^3)
factor([x^2-y^2,x^3+y^3])
When you run the file, it displays the following result:
ans =
(x - y)*(x^2 + x*y + y^2)
ans =
[ (x - y)*(x + y), (x + y)*(x^2 - x*y + y^2)]
No comments:
Post a Comment