Average of 5 vectors that they are 20-D

44 Views Asked by At

I am just trying to write down the equation for this operation I describe on the title.

So suppose the we have these vectors:

$v1=[q_{1,1}, q_{1,2}, ... , q_{1,20}]$
$v2=[q_{2,1}, q_{2,2}, ... , q_{2,20}]$
.
.
$v5=[q_{5,1}, q_{5,2}, ... , q_{5,20}]$

I came up with this equation:

$$\frac{1}{5}\sum_{i=1}^{20}\sum_{j=i}^{5} q_{i,j}$$

So I was wondering if this is correct, at least on matlab i am getting the correct output, but can it be re-written differently / more efficiently?

Thanks

2

There are 2 best solutions below

5
On BEST ANSWER

You can just described them in terms of $v_i$:

$$\frac15 \sum_{i=1}^5 v_i$$

or $\bar{v} \in \mathbb{R}^{20 \times 1}$, where $\bar{v}_j = \frac15\sum_{i=1}^5 q_{ij}$ where $j \in \{ 1, \ldots, 20\}$.

2
On

If $u = (1,1,...,1)$ ($20$ ones) then you can write:

$$ \overline{v} = {1\over 5} \sum_{i=1}^5 v_i\cdot u$$