How do you make it so that the simplify function displays the correct answer?
1 回表示 (過去 30 日間)
古いコメントを表示
syms s
simplify((s+30)*(s^2-20*s+200))
^ This is the code that I have currently. Instead of simplifying the entire expression, Matlab is just returing the original expression back to me: (s + 30)*(s^2 - 20*s + 200). How can I change it so that the entire expression actually gets simplified?
0 件のコメント
回答 (2 件)
Steven Lord
2022 年 5 月 8 日
syms s
simplify((s+30)*(s^2-20*s+200))
expand((s+30)*(s^2-20*s+200))
0 件のコメント
Walter Roberson
2022 年 5 月 8 日
(s^2 - 20*s + 200)
The roots of that are 10 +/- 10i . So that expression is already fully factorized to real coefficients, and what you got is already the simplest version, under quite reasonable meanings of "simplify".
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Number Theory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!