0

Let's say a I have a signal

x= [1,2,3,4,5,6,7,8,9,10,11]
y= [0, 2, 4, 6, 8, 10, 8, 6, 4, 2, 0]

How do I normalize this signal so the integral from 0 to 10 (along x-axis) would give me 1? Meaning the total power of the signal will be 1 after normalization.

MRR
  • 25
  • 6
  • both of your answers helped me and are correct, but unfortunately i can only accept one answer. dont know which one to do. – MRR Oct 11 '22 at 17:22
  • No problem @MRR, please accept either answer so that your question doesn't stay in the "unanswered" category ;) – Jdip Oct 11 '22 at 17:33

2 Answers2

1

Just to clarify, it seems the signal you describe in this case is $y$ with $x$ as the indices for $y$. If you want a normalized version of $y$, say $\hat{y}$, such that $\hat{y}^H\hat{y} = 1$ ($x^H$ is the hermitian transpose of $x$) one option is to take $\hat{y} = \frac{y}{\Vert y\Vert_2}$ in which $\Vert y \Vert_2 = \left( \Sigma_{i=0}^{N-1} \lvert y_i \rvert ^2\right)^{\frac{1}{2}}$ (note this is a scalar). This definition of normalization is used for normalizing the power of the signal. Notice that $\hat{y}^H\hat{y} = \frac{y^Hy}{\Vert y\Vert_2^2} = 1$ since $ y^Hy = \Vert y \Vert_2^2$.

Peter H
  • 11
  • 1
0

You're asking two different things, I'll answer both here:

If you want the integral of your signal to be equal to $1$, i.e $$\sum_{n=0}^{10} y[n] = 1$$ just divide every element by sum(y):

y = y / sum(y);

If you want your signal power to be 1, i.e $$\sum_{n=0}^{10} y[n]^2 = 1$$

y = y / sqrt( sum( y.^2 ) )
Jdip
  • 5,980
  • 3
  • 7
  • 29