How to normalize a discrete signal?
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
RoBoTBoY
am 23 Jan. 2021
Kommentiert: Adam Danz
am 24 Jan. 2021
Hello!!
I want to calculate the signal energy in rolling windows, after first normalizing to interval [-1,1].
Firstly, I wrote the below code to read and sound the signal.
[y,Fs] = audioread('viola_series.wav');
plot(y);
title('Audio viola series.wav');
sound(y,Fs);
How to do the normalization?
Thanks in advance
0 Kommentare
Akzeptierte Antwort
Adam Danz
am 23 Jan. 2021
Audio data are typically already normalized between [-1,1]. Are you getting values outside of that range?
min(y)
max(y)
Anyway, this is how to normalize any vector to [-1,1];
ynorm = (y-min(y))/range(y)*2-1;
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!