function a = st_to_ge ( I, J, X )

%*****************************************************************************80
%
%% st_to_ge() converts a sparse tripet (ST) matrix to general (GE) storage.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 June 2014
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer I(ntriplets), J(ntriplets), the row and column indices.
%
%    real X(ntriplets), the nonzero matrix values.
%
%  Output:
%
%    real A(M,N), the corresponding full storage matrix.
%

%
%  Guess the number of rows and columns.
%
  m = max ( I );
  n = max ( J );
%
%  Copy the data as a vector.
%
  a(I+(J-1)*m) = X;
%
%  Reshape as a matrix.
%
  a = reshape ( a, m, n );

  return
end

