Adjust the power of a digital signal to a given value I have two signals: $x(n)$ is a white-noise signal with a given variance, $y(n)$ is the sum of white noise plus a sum of sinusoids.
$$
x(n) = v_1(n)
$$
$$
y(n) = \sum_{i=1}^{q} [ a_i \cos(\omega_i n) + b_i \sin(\omega_i n)  ] + v_2(n)
$$
$$
v_{1,2}(n) \sim W.N.(0,\sigma^2)
$$

And that is how I generate the two signals on Matlab. Now I'd like to normalise $y(n)$ so that its power is the same as $x(n)$, how can I do that?
Multiply y(n) by std(x)/std(y)