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.

 Respuesta aceptada

madhan ravi
madhan ravi el 12 de Jun. de 2020
syms alpha F R
simplify((3*F*R^2*alpha)/64 - 3*R*sqrt(F^2*R^2*alpha^2)/64,...
'IgnoreAnalyticConstraints', true)

6 comentarios

Walter Roberson
Walter Roberson el 12 de Jun. de 2020
Right. The two parts are not the same if some of the values are negative.
Mohit Kumar
Mohit Kumar el 12 de Jun. de 2020
Ah of course! MATLAB doesn't recognise that the values are purely real. Thanks!
madhan ravi
madhan ravi el 12 de Jun. de 2020
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 el 13 de Jun. de 2020
Right, understood. Thanks guys!
Sariñana Aarón
Sariñana Aarón el 16 de Nov. de 2023
Great, thanks!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Productos

Versión

R2020a

Preguntada:

el 12 de Jun. de 2020

Comentada:

el 16 de Nov. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by