How can I solve this: (x-2)*(x+1)^3?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
LUCA GIROTTI
el 10 de Mzo. de 2022
Hey there,
I am trying to process this "(x-2)*(x+1)^3" through matlab in way that I can have a result like this:
However every time I try to perform this operation, matlab keeps on telling me that x is set to nothing, how can I solve this?
Thanks in advance!
0 comentarios
Respuesta aceptada
Ayaz Siddiqui
el 10 de Mzo. de 2022
Editada: Ayaz Siddiqui
el 10 de Mzo. de 2022
Try using expand.
syms x;
expand((x-2)*(x+1)^3)
Más respuestas (1)
Sam Chak
el 10 de Mzo. de 2022
It's good to hear that you tried working out something by yourself. You need to create a symbolic variable for x.
syms x
For more info, please check:
2 comentarios
Sam Chak
el 10 de Mzo. de 2022
Editada: Sam Chak
el 10 de Mzo. de 2022
Good to hear that. If you are dealing with algebraic expressions and analytical problems, you will be using syms a lot! You can find lots of examples and learn a lot of functions here to perform many types of symbolic computations:
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!