How can I solve this: (x-2)*(x+1)^3?
4 ビュー (過去 30 日間)
古いコメントを表示
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: ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/921804/image.gif)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/921804/image.gif)
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 件のコメント
採用された回答
Ayaz Siddiqui
2022 年 3 月 10 日
編集済み: Ayaz Siddiqui
2022 年 3 月 10 日
Try using expand.
syms x;
expand((x-2)*(x+1)^3)
その他の回答 (1 件)
Sam Chak
2022 年 3 月 10 日
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:
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!