How normalize works
Posted: Sun May 23, 2021 9:52 pm
Since I have reason to believe that some of you might not understand fully what normalizing does, here an explanation.
In general normalizing means to take a set of values and re-scale them (keeping their relative relationship intact), so that they end in the range of 0 to 1. In DSP however, we most often work bipolar, so here normalizing means the same, but for the range -1 to 1.
What normalizing does not do, is stretching or otherwise destroy the relationship of the values. This means, that you will not end up with an array that fills the peaks necessarily. Example:
It will not stretch 1.5 to become -1! That's important to understand. That would destroy the established relationship of the values! As a result, our example array would never reach -1.
If you had the thought, normalizing would somehow make sure the values stretch over the whole range, I hope I could give you enough information as to why that is not the case.
Keep on developing!
In general normalizing means to take a set of values and re-scale them (keeping their relative relationship intact), so that they end in the range of 0 to 1. In DSP however, we most often work bipolar, so here normalizing means the same, but for the range -1 to 1.
What normalizing does not do, is stretching or otherwise destroy the relationship of the values. This means, that you will not end up with an array that fills the peaks necessarily. Example:
- Code: Select all
our array: 3, 1.5
after normalizing: 1, 0.5
It will not stretch 1.5 to become -1! That's important to understand. That would destroy the established relationship of the values! As a result, our example array would never reach -1.
- Code: Select all
our array: 3, 1.5, -2.1
after normalizing: 1, 0.5, -0.7
- Code: Select all
our array: 3, 1.5, -4
after normalizing: 0.75, 0.375, -1
If you had the thought, normalizing would somehow make sure the values stretch over the whole range, I hope I could give you enough information as to why that is not the case.
Keep on developing!