Symbolic toolbox not simplifying adequately

I'm using MATLAB Live Editor along with the symbolic toolbox. The following expression is not getting simplified. Any fixes?
I've tried using simplify to no avail.
Thanks,
Mohit.

 채택된 답변

madhan ravi
madhan ravi 2020년 6월 12일

0 개 추천

syms alpha F R
simplify((3*F*R^2*alpha)/64 - 3*R*sqrt(F^2*R^2*alpha^2)/64,...
'IgnoreAnalyticConstraints', true)

댓글 수: 6

Right. The two parts are not the same if some of the values are negative.
Mohit Kumar
Mohit Kumar 2020년 6월 12일
Ah of course! MATLAB doesn't recognise that the values are purely real. Thanks!
madhan ravi
madhan ravi 2020년 6월 12일
MATLAB doesn’t have “Mind Reading Toolbox” ;)
real is not enough: consider negative real numbers.
You can add assumptions to symbols such as
syms alpha positive
syms R
assume(R>=0)
Mohit Kumar
Mohit Kumar 2020년 6월 13일
Right, understood. Thanks guys!
Great, thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품

릴리스

R2020a

질문:

2020년 6월 12일

댓글:

2023년 11월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by