clear functions

  k     = 1;      % number of rows for the Qi(s)
  m     = 1;      % number of columns for the Qi(s)
  alpha = 5;      % pole for the Qi(s)
  q     = 10;     % maximum number of poles

  % Inputs:
  %   k     - number of rows for the Qi(s)
  %   m     - number of columns for the Qi(s)
  %   alpha - pole for the Qi(s) in the Ritz expansion
  %   q     - maximum multiplicity for the Qi(s) poles in the Ritz expansion
  % Output:
  %   Qi    - cell array with Q1(s), Q2(s), ..., QN(s)

  Qi = cell(k*m*(q+1),1);
  N  = 0;
  for ell = 0:q
      for i = 1:k
          for j = 1:m
              N = N+1;      
              Qi{N}      = ss(zeros(k,m));
              Qi{N}(i,j) = (alpha/(tf('s')+alpha))^ell;      
          end
      end
  end  


