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);
    for j=1:fix(floor(size(signal,1)/signalWindow-1)*shiftProp+1)
        WL(j)=sum(abs(diff(signal((j-1)*signalShift+1:(j-1)*signalShift+signalWindow))));
    end
end

