%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SimInit.m     : init the simulation data
% author        : duweitao
% date          : 2008.May.25
% version       : 0.1
% modify        : initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function simData = SimInit(cfg)
% load from the struct obj
  random_T = cfg.random_T   ;  
  sine_T   = cfg.sine_T     ;  
  stimType = cfg.stimType   ;  
  freqNorm = cfg.freqNorm   ;  
  Amp      = cfg.Amp        ;  
  N        = cfg.N          ;  

  if(stimType == sine_T) 
    idx = [0:N-1];
    inputData = Amp*exp(j*2*pi*freqNorm*idx);
  elseif(stimType == random_T)
    inputData = rand(N,1)-0.5;
    inputData = inputData + j*(rand(N,1)-0.5);
    inputData = inputData * Amp;
  else
    error('stimType set incorrect');
  end
   
  simData.inputData = inputData;
   
end
