'simplify' expression not efficient in Matlab2015

1 visualización (últimos 30 días)
Kiran Sagar
Kiran Sagar el 21 de Feb. de 2016
Comentada: Star Strider el 21 de Feb. de 2016
I used Matlab 2015 to simplify an trigonometric expression, but in vain. It is not able to replace 1-sin^2() with cos^2(). If my memory serves correctly, Matlab2014 was able to do this very efficiently.
Is there a new function that does this in 2015, or we just lost a great feature.
Edit: Inserted Picture

Respuestas (1)

Walter Roberson
Walter Roberson el 21 de Feb. de 2016
syms theta
simplify( 1 - sin(theta)^2 )
  2 comentarios
Kiran Sagar
Kiran Sagar el 21 de Feb. de 2016
Editada: Kiran Sagar el 21 de Feb. de 2016
If I do that, I get the following:
Star Strider
Star Strider el 21 de Feb. de 2016
In R2015b:
syms theta
q1 = simplify(1 - sin(theta)^2, 'steps', 10)
q2 = rewrite(1 - sin(theta)^2, 'cos')
q1 =
cos(theta)^2
q2 =
cos(theta)^2

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by