Previous Up Next

7.4.8  Barycenter of complex numbers

The barycenter, or center of mass, of a set of points A1, A2,…,An with masses α12,…,αn is

  
α1A1+⋯+αnAn
α1+⋯ + αn

This formula makes sense even if the αj are not positive real numbers, and is still called the barycenter of the weighted points.

The barycenter command computes the barycenter of a set of weighted points.

Remark.

Note that the barycenter command returns a point, not an affix. To output the point affix, you must input affix(barycenter(l1,l2)) (see Section 26.12.1).

Example

affix(barycenter([1+i,2],[1-i,1]))

or:

affix(barycenter([[1+i,2],[1-i,1]]))
     
3+i
3
          

Previous Up Next