function w = rotation_mat_vector ( a, v )

%*****************************************************************************80
%
%% rotation_mat_vector() applies a marix rotation to a vector in 3d.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 May 2005
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A(3,3), the matrix defining the rotation.
%
%    real V(3,1), the vector to be rotated.
%
%  Output:
%
%    real W(3), the rotated vector.
%
  v = v(:);
  
  w = a * v;

  return
end
