How do you make it so that the simplify function displays the correct answer?

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?

답변 (2개)

syms s
simplify((s+30)*(s^2-20*s+200))
ans = 
expand((s+30)*(s^2-20*s+200))
ans = 
(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".

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2022a

질문:

2022년 5월 8일

답변:

2022년 5월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by