Calculating the total energy of a signal
The energy of a discrete-time signal is the sum of the squares:

$$
E_x = \sum_n |x[n]|^2
$$

If you need the average power of your signal, divide the energy by the number of samples in your vector. Power is the average energy per sample of your signal.

If your signal vector is a sample of a stationary process (i.e. a recording clip of someone talking), then average power probably has more meaning than energy (which will grow with the sample length).