Matlab Summation Cosine Sine operator
4 views (last 30 days)
Show older comments
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;
0 Comments
Accepted Answer
Mischa Kim
on 27 Feb 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.
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!