% x2 - data setup for symbol values (0,1) with f(D) = 1 + 0.5D
% KB ECE 8770 Spring 1998 Lecture 11 page 6

if( K == 1)

  G = [];

  LOADED = 2;

  FIR = [1 0.5]';

%  FIR = FIR / norm(FIR);        % normalize so |FIR| = 1

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

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

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

  M = MM_max;                   % number of states

  zstate = 1;                   % initial state

  x = [ 0 1 0 0];		% 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

  noise = [ 0.2 -0.4 0.4 0.1];		% "random" noise

  z = y + noise;			% signal plus noise

else	% K > 1

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

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

end
