I want to know how to write a matlab function

3 views (last 30 days)
hello i want to write a matlab code that convers sind(120)=0.866025403784439 but not in this format. I want to get it in the format of *sqrt(3)/2* in matlab.
just in case i calculate some other sin(x)'s i manage to convert them into fractional forms
Thanks
  5 Comments
madhan ravi
madhan ravi on 17 Oct 2018
answers are only accepted only if it works nothing comes for free

Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 17 Oct 2018
sym(0.866025403784439)
frac(ans)
  3 Comments
madhan ravi
madhan ravi on 17 Oct 2018
Edited: madhan ravi on 17 Oct 2018
You’re welcome you can vote for the answer too

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!