www.pudn.com > cyclostationary_toolbox.rar > cyclic_mean.m, change:1997-11-25,size:683b


function m=cyclic_mean(x,alpha)
%
% CYCLIC_MEAN  Calculates the cyclic-mean of a signal
%              m(k*alpha)=E{x(t)exp(-j(k*alpha)t)}
%              for k = 0 ... 1/alpha
%
% USAGE
%              m=cyclic_mean(x,alpha)
%              

% File: cyclic_mean.m
% Last Revised: 25/11/97
% Created: 24/11/97
% Author: Andrew C. McCormick
% (C) University of Strathclyde

% Simple error checks
if nargin~=2
  error('Incorrect number of arguments for function cyclic_mean');
end
if alpha>2*pi
  error('Cyclic frequency must be less than 2*pi in function cyclic_mean');
end


T=ceil(2*pi/alpha)-1;
t=0:length(x)-1;

m=zeros(1,T+1);
for k=0:T
  m(k+1)=mean(x.*exp(-j*k*alpha*t));
end