function [WL]=waveformLength(signal,frequency,window,windowShift)
%waveformLength computes waveformLength of signal with given frequency, window and
%shift
    signalShift=frequency*windowShift;
    signalWindow=frequency*window;
    shiftProp=window/windowShift;
    WL=zeros((floor(size(signal,1)/signalWindow)-1)*shiftProp+1,1);
    parfor j=1:(size(signal,1)/signalWindow-1)*shiftProp+1
        WL(j)=sum(diff(signal((j-1)*signalShift+1:(j-1)*signalShift+signalWindow)));
    end
end

