function c83_print_some ( n, a, ilo, jlo, ihi, jhi, title )

%*****************************************************************************80
%
%% c83_print_some() prints some of a C83 matrix.
%
%  Discussion:
%
%    The C83 storage format is used for a complex tridiagonal matrix.
%    The superdiagonal is stored in entries (1,2:N), the diagonal in
%    entries (2,1:N), and the subdiagonal in (3,1:N-1).  Thus, the
%    original matrix is "collapsed" vertically into the array.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 May 2010
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of the matrix.
%    N must be positive.
%
%    complex A(3,N), the C83 matrix.
%
%    integer ILO, JLO, IHI, JHI, the first row and
%    column, and the last row and column, to be printed.
%
%    string TITLE, a title.
%
  incx = 3;

  fprintf ( 1, '\n' );
  fprintf ( 1, '%s\n', title );
%
%  Print the columns of the matrix, in strips of 5.
%
  for j2lo = jlo : incx : jhi

    j2hi = j2lo + incx - 1;
    j2hi = min ( j2hi, n );
    j2hi = min ( j2hi, jhi );

    inc = j2hi + 1 - j2lo;

    fprintf ( 1, '\n' );
    fprintf ( 1, '  Col:  ' );
    for j = j2lo : j2hi
      fprintf ( 1, '%8d      %8d      ', j, j );
    end
    fprintf ( 1, '\n' );
    fprintf ( 1, '  Row\n' );
    fprintf ( 1, '  ---\n' );
%
%  Determine the range of the rows in this strip.
%
    i2lo = max ( ilo, 1 );
    i2lo = max ( i2lo, j2lo - 1 );
    i2hi = min ( ihi, n );
    i2hi = min ( i2hi, j2hi + 1 );

    for i = i2lo : i2hi
%
%  Print out (up to) INCX entries in row I, that lie in the current strip.
%
      for j2 = 1 : inc

        j = j2lo - 1 + j2;

        if ( 1 < i - j | 1 < j - i )

          fprintf ( 1, '                        ' );

        else

          if ( j == i - 1 )
            xr = real ( a(1,i) );
            xi = imag ( a(1,i) );
          else if ( j == i )
            xr = real ( a(2,i) );
            xi = imag ( a(2,i) );
          else if ( j == i + 1 )
            xr = real ( a(3,i) );
            xi = imag ( a(3,i) );
          end

          if ( xr == 0.0 & xi == 0.0 )
            fprintf ( 1, '     0.0                ' );
          else if ( xr == 0.0 & xi ~= 0.0 )
            fprintf ( 1, '            %12f', xi );
          else if ( xr ~= 0.0 & xi == 0.0 )
            fprintf ( 1, '%12f            ', xr );
          else
            fprintf ( 1, '%12f%12f', xr, xi );
          end

        end

      end

      fprintf ( 1, '\n' );

    end

  end

  return
end
