Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<Double> shortTermZeroCrossingRate(List<Double> window, List<Double> scaledSamples){
- List<Double> temp = new ArrayList<Double>();
- List<Double> zcr = new ArrayList<Double>();
- List<Double> horzAxisCrosses = new ArrayList<Double>();
- for(int i=1; i<scaledSamples.size(); i++){
- horzAxisCrosses.add( Math.abs( Math.signum(scaledSamples.get(i)) - Math.signum(scaledSamples.get(i-1)) ));
- }
- temp = convolution(window, horzAxisCrosses);
- for(int i=0; i<temp.size();i++){
- zcr.add(temp.get(i)/ (2*window.size()) );
- }
- return zcr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement