function [wvars] = wvar_norm_wave( coefs, win, moment)
%WVAR Summary of this function goes here
%  Detailed explanation goes here
[rw,cw]=size(coefs);

for ii=1:rw
  for jj=1:cw
  coefs_stand(ii,jj)=(coefs(ii,jj)-mean(coefs(ii,:)))/std(coefs(ii,:));    
end
end

for i=1:rw
    
    for j=1:length(coefs_stand)-win
        x=coefs_stand(i,j:j+win);
        %for j=1:length(coefs)-win
        %x=coefs(i,j:j+win);
        %end
        x=x';
        x_mean=sum(x)/win;
        x_mean=repmat(x_mean,win,1);
        
        
        %end  
        %end
         for jj=1:win
              x_var(jj)=(x(jj)-x_mean(jj))^moment;
         end
        x_var_1(i,j)=sum(x_var)/(win-1);
    end
end
    zx=zeros(rw,win);
    wvars=[zx x_var_1];