% KB ECE 8770 Spring 1998 MSLE computer assignment

if( K == 1)

  G = [];

  LOADED = 7;

  FIR = [0.407 0.815 0.407]';	% impulse response coefficients of ISI channel

  Memory = size(FIR,1) - 1;     % channel memory size

  states = FSM( [-1 1], Memory);

  MM_max = size(states,2);      % number of symbol values

  M = MM_max;                   % number of states

  zstate = 1;                   % initial state

  x = [ 1  1  1  1  -1  1  1  1  1  1  -1  -1  1  -1  1];	% input sequence
  
  N = size(x,2);       % N data samples

  trans = FSM_trans( states, FIR);	% get state transition matrix
  
  % y = FSM_out( x, FIR);	% get FSM output 
  
   y = [0.6260 1.2690 2.3079 2.3083 1.7497 0.3825 1.3344 2.4600 1.6636 1.6825 1.3447 -0.1439 -0.8073 0.3844 0.0658];

  noise = 0;		% "random" noise
  
  z = y + noise;	% signal plus noise

else	% K > 1

  error( 'sorry... isi stuff only works with K=1');

  if( LOADED ~= 7)
    error( 'initialize with K = 1 first');
  end

end
