How do i normalize a signal so that it's maximum is 1?
28 views (last 30 days)
I know to do this all I would have to do is find the maximum value for the whole duration of the signal, and then divide the signal by this value. However, I'm having trouble capturing the maximum value signal as a constant value. When I tried using the running max block this didn't work correctly because the running max changes over time. Also, the normal max block simply outputs whatever signal is put into it, which isn't helpful.
Any help is appreciated.
Sulaymon Eshkabilov on 9 Nov 2021
t=linspace(0, 2, 1e3);
f1 = 5;
f2 = 10;
S = cos(2*pi*f1*t)+sin(2*pi*f2*t)+rand(size(t))/5;
plot(t,S), title('Original Signal'), grid on
SM = max(S);
SN = S/SM(1);
plot(t, SN), grid on; title 'Normalized Signal';