function J = p23_j ( m, n, x )

%*****************************************************************************80
%
%% p23_j() evaluates the jacobian for problem 23.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%  Modified:
%
%    03 March 2026
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the number of equations.
%
%    integer N, the number of variables.
%
%    real X(N), the evaluation point.
%
%  Output:
%
%    real J(M,N), the jacobian matrix.
%
  J = zeros ( m, n );

  B = [ ...
     0.354033,     -0.230349E-01, -0.211938,     -0.554288E-01,  0.220429; ...
    -0.230349E-01,  0.291350,     -0.180333E-02, -0.111141,      0.485461E-01; ...
    -0.211938,     -0.180333E-02,  0.815808,     -0.133538,     -0.380670; ...
    -0.554288D-01, -0.111141,     -0.133538,      0.389198,     -0.131586; ...
     0.220429,      0.485461E-01, -0.380670,     -0.131586,      0.534706 ];

  C = [ ...
    -0.564255,  0.392417, -0.404979,  0.927589, -0.735083E-01; ...
     0.535493,  0.658799, -0.636666, -0.681091, -0.869487; ...
     0.586387,  0.289826,  0.854402,  0.789312,  0.949721; ...
     0.608734,  0.984915,  0.375699,  0.239547,  0.463136; ...
     0.774227,  0.325421, -0.151719,  0.448051,  0.149926; ...
    -0.435033, -0.688583,  0.222278, -0.524653,  0.413248; ...
     0.759468, -0.627795,  0.0403142, 0.724666, -0.182537E-01; ...
    -0.152448, -0.546437,  0.484134,  0.353951,  0.887866; ...
    -0.821772, -0.53412,  -0.798498, -0.658572,  0.662362; ...
     0.819831, -0.910632, -0.480344, -0.871758, -0.978666 ];

  d = [ ...
    0.234659E+01; 0.284048E+01;  0.113888E+01; 0.302286E+01;  0.172139E+01; ...
    0.153917;     0.290577;     -0.159378;     0.546910E+02; -0.444873 ];

  h = zeros ( n, 1 );
  for j = 1 : n
    hfac(j) = 0.0;
    for k = 1 : n
      hfac(j) = hfac(j) + 0.5 * ( B(j,k) + B(k,j) ) * x(k);
    end
  end

  for j = 1 : n
    J(1:m,j) = C(1:m,j) + d(1:m) * hfac(j);
  end

  return
end
