function [ A1, A2, A3 ] = lesp_tri ( n )
%
% function [ A1, A2, A3 ] = lesp_tri ( n )
%
%  Discussion:
%
%    LESP_TRI sets up the Lesp matrix in tridiagonal format.
%
%  Example:
%
%    N = 5
%
%     -5    2    0    0     0
%     1/2  -7    3    0     0
%      0   1/3  -9    4     0
%      0    0   1/4 -11     5
%      0    0    0   1/5  -13
%
%    A1,   A2, A3=
%
%    1/2   -5   2
%    1/3   -7   3
%    1/4   -9   4
%    1/5  -11   5
%         -13
%
%  Modified:
%
%    01 April 2000
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer N, the order of the matrix.  N should be at least 2.
%
%    Output, real A1(N-1), A2(N), A3(N-1), the subdiagonal, diagonal, and
%    superdiagonal elements of the matrix A.
%
for i = 1 : n-1
  A1(i,1) = 1 / (i+1);
end

for i = 1 : n
  A2(i,1) = - ( 2 * i + 3 );
end

for i = 1 : n-1
  A3(i,1) = i+1;
end

