I want to know how to write a matlab function

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 Kommentare

madhan ravi
madhan ravi am 17 Okt. 2018
See my answer below
Adam
Adam am 17 Okt. 2018
Your question doesn't make any sense. 0.866025403784439 is already the value of sqrt(3)/2 to the precision used. What does this have to do with wanting to know how to write a matlab function?
madhan ravi
madhan ravi am 17 Okt. 2018
stop changing your question
Adam
Adam am 17 Okt. 2018
Editing a question to make it more understandable is encouraged. Begging for accepting answers and votes for answers certainly isn't though!
madhan ravi
madhan ravi am 17 Okt. 2018
answers are only accepted only if it works nothing comes for free

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

madhan ravi
madhan ravi am 17 Okt. 2018

2 Stimmen

sym(0.866025403784439)
frac(ans)

3 Kommentare

madhan ravi
madhan ravi am 17 Okt. 2018
Make sure to accept the answer it it worked
kay Dee
kay Dee am 17 Okt. 2018
Thanks it works
madhan ravi
madhan ravi am 17 Okt. 2018
Bearbeitet: madhan ravi am 17 Okt. 2018
You’re welcome you can vote for the answer too

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by