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 GNU LGPL license.
%
%  Modified:
%
%    22 May 2005
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, real A(3,3), the matrix defining the rotation.
%
%    Input, real V(3,1), the vector to be rotated.
%
%    Output, real W(3), the rotated vector.
%
  v = v(:);
  
  w = a * v;

  return
end
