Preference of outputting sine function

Hello, can anybody help me with this:
sympref('FloatingPointOutput',true);
syms theta
F=2*sind(2*theta)
--------------------------
F =
2*sin(0.0349*theta)
--------------------------
I want the sine function to be sine in degrees in the output, I don't want the program to automatically convert it to radians.. Can anyone help ?
Thanks !!

5 Comments

Isn't 2*sin(0.0349*theta) equivalent to 2*sind(2*theta)? I don't see the problem.
I want the form of the answer to be in sind and not in sin
That's my problem
It looks easy here but I have longer statements and functions, if I could get sind function in the output in would help me a lot..
Is it just an aesthetic preference? What would be the practical benefit of having things expressed in terms of sind?
No, I just don't wanna have to multiply every theta with 180/pi
Assume I have this:
sympref('FloatingPointOutput',true);
syms w
syms m
syms r
syms L
syms theta
alpha=input('Enter the angle alpha: ');
F1=m*r*w^2*(cosd(theta+alpha)+r/L*cosd(2*theta+2*alpha));
F1=simplify(F1,'Steps',10);
disp(F1)
---------------------------
Enter the angle alpha: 45
m*r*w^2*(cos(0.0175*theta + 0.7854) + (r*cos(0.0349*theta + 1.5708))/L)
---------------------------
I should get an answer like this: F1=m*r*w^2*(0.707*(cosd(theta) - sind(theta)) - r/L*sind(2*theta))
How can I get the to the closest form of this answer ?
the case might require a theta input too, how could I get an expression that is valid for these cases too ?
The answer is for machine dynamics class, so also yes, the form of the answer matters a bit..

Sign in to comment.

Answers (0)

Products

Release

R2019b

Tags

Asked:

on 25 Dec 2020

Commented:

on 25 Dec 2020

Community Treasure Hunt

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

Start Hunting!