Matlab Summation Cosine Sine operator

3 vues (au cours des 30 derniers jours)
nullpointer
nullpointer le 27 Fév 2015
Commenté : nullpointer le 27 Fév 2015
Hi all,
i have been looking at this matlab equation for sometime. I do not understand the sum operation used here. It is used to sum the sin for array b? Likewise for cos?
a = atan2(sum(sin(b)),sum(cos(b)))/2/k;

Réponse acceptée

Mischa Kim
Mischa Kim le 27 Fév 2015
Correct. b is an array (e.g. vector). The command applies the sine to all the components of b and then sums all those sine terms. Same is true for the cosines.
  1 commentaire
nullpointer
nullpointer le 27 Fév 2015
Thanks alot for your help!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by