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: qGetQ.m
    path of file: ./repos/CutAndDisplace/SharedFunctions/Quats
    
    the code of the file until where you have to start completion: function Q = qGetQ( R )
% qGetQ: converts 3x3 rotation matrix into equivalent quaternion

    
function Q = qGetQ( R )
% qGetQ: converts 3x3 rotation matrix into equivalent quaternion
% Q = qGetQ( R );

[r,c] = size( R );
if( r ~= 3 | c ~= 3 )
    fprintf( 'R must be a 3x3 matrix\n\r' );
    return;
end