function x = i4vec_shift_circular ( n, x, k )

%*****************************************************************************80
%
%% i4vec_shift_circular() performs a circular shift on an I48VEC.
%
%  Discussion:
%
%    The system function circshift(x,k) should be preferred.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 June 2024
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of vector entries.
%
%    integer X(N), the vector to be shifted.
%
%    integer K, the amount by which each entry is to
%    be shifted.  K should be nonnegative.
%
%  Output:
%
%    integer X(N), the shifted vector.
%
  x = x(:);

  x = [ x(n+1-k:n); x(1:n-k) ];

  return
end
