Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int L = 0.1f;
- public float calcAutocorrelation(float[] frame)
- int N = frame.Length; //frame size
- float result = 0f;
- for (var n = 0; n < N; n++){
- result += frame[n] * frame[n + L] //in programming this is not possible as L is a float but formula says this is needed???
- //I could cast the L to an INT type but the paper states that L should range between 0 and 1, and in-code we'll probably end up with L rounded to 0 most of the time.
- }
- return result;
- }
Add Comment
Please, Sign In to add comment