Guest User

Untitled

a guest
Jul 15th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public int L = 0.1f;
  2.  
  3. public float calcAutocorrelation(float[] frame)
  4.  
  5. int N = frame.Length; //frame size
  6.  
  7. float result = 0f;
  8. for (var n = 0; n < N; n++){
  9. result += frame[n] * frame[n + L] //in programming this is not possible as L is a float but formula says this is needed???
  10. //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.
  11. }
  12.  
  13. return result;
  14. }
Add Comment
Please, Sign In to add comment