You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: Euler.m
    path of file: ./repos/mtex/geometry/@quaternion
    
    the code of the file until where you have to start completion: function varargout = Euler(quat,varargin)
% quaternion to euler angle
%
% Description
% calculates the Euler angle for a rotation |q|
%
% Syntax
%   [alpha,beta,gamma] = Euler(quat,'ABG') -
%   [phi1,Phi,phi2] = Euler(quat) -
%   euler = Euler(quat) -
%
% Input
%  quat - @quaternion
%
% Output
%  alpha, beta, gamma  - Matthies
%  phi1, Phi, phi2     - BUNGE
%

    
function varargout = Euler(quat,varargin)
% quaternion to euler angle
%
% Description
% calculates the Euler angle for a rotation |q|
%
% Syntax
%   [alpha,beta,gamma] = Euler(quat,'ABG') -
%   [phi1,Phi,phi2] = Euler(quat) -
%   euler = Euler(quat) -
%
% Input
%  quat - @quaternion
%
% Output
%  alpha, beta, gamma  - Matthies
%  phi1, Phi, phi2     - BUNGE
%
% Options
%  ABG, ZYZ   - Matthies (alpha,beta,gamma) convention
%  BUNGE, ZXZ - Bunge (phi, Phi, phi2) convention (default)
%
% See also
% quaternion/Rodrigues

% check input
if isa(quat,'quaternion')
  qa = quat.a;
  qb = quat.b;
  qc = quat.c;
  qd = quat.d;
elseif find_type(varargin,'symmetry')
  varargout{1} = orientation.byEuler(quat,varargin{:});
  return
end