Simplifying equations with trigonometric terms written in terms of degrees and not radians

1 visualizzazione (ultimi 30 giorni)
I am trying to simplify equations which contains trigonometric terms.
For example, the final output reads: sin(40x) +cos(50y). Here the simplification is made such a way that the units of the variables x and y is radians. I can manually modify and simplify the equation for supporting the units as degrees. However, is there a way to tell MATLAB to simplify the equations and present them as cosd and not cos?

Risposte (1)

Walter Roberson
Walter Roberson il 3 Giu 2023
C2D = @(C) cosd(rad2deg(children(C, 1)))
mapSymType(Expression, 'cos', C2D) 

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by