Matlab Trigonometry and built in functions

Hello Dear Forum Members;
>> cos(pi/5)*cos(pi/5)=(tan(pi/5)+sin(pi/5))/(2*tan(pi/5))
cos(pi/5)*cos(pi/5)=(tan(pi/5)+sin(pi/5))/(2*tan(pi/5))
Error: The expression to the left of the equals sign is not a valid target for an assignment.
>> cos(pi/5)*cos(pi/5)
ans =
0.6545
I have written the codes above but they are not matched. I kindly request your help. Thank you...

 Réponse acceptée

James Tursa
James Tursa le 4 Oct 2016
You are missing the /2 inside the cosine on the lhs. E.g.,
>> cos((pi/5)/2)^2
ans =
0.904508497187474

Plus de réponses (0)

Catégories

En savoir plus sur Entering Commands dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by