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: DCM_Angles321.m
    path of file: ./repos/SPART/src/attitude_transformations
    
    the code of the file until where you have to start completion: function Angles = DCM_Angles321(DCM) %#codegen
%Convert the DCM to Euler angles (321 sequence), x-phi, y-theta, z-psi.
%
% This solution generates angle theta between -pi/2 and pi/2,
% and angles phi and psi between -pi and pi.


    
function Angles = DCM_Angles321(DCM) %#codegen
%Convert the DCM to Euler angles (321 sequence), x-phi, y-theta, z-psi.
%
% This solution generates angle theta between -pi/2 and pi/2,
% and angles phi and psi between -pi and pi.

Angles=[ atan2(DCM(2,3),DCM(3,3));
        asin(-DCM(1,3));
        atan2(DCM(1,2),DCM(1,1))];


end