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: det_rootn.m
    path of file: ./repos/Robotics-Toolbox/rvcdlcs/src/thirdparty/iris-distro/src/matlab/+iris/+thirdParty/+mosek_lownerjohn
    
    the code of the file until where you have to start completion: %%
%  Copyright: Copyright (c) MOSEK ApS, Denmark. All rights reserved.
%
%  File:      det_rootn.m
%
%  Purpose: Models the hypograph of the n-th power of the
%  determinant of a positive definite matrix.
%
%  The convex set
    
function [] = det_rootn(M, X, t)

import mosek.fusion.*;
import iris.thirdParty.mosek_lownerjohn.geometric_mean;

n = sqrt(X.size());

% Setup variables
Y = M.variable(Domain.inPSDCone(2*n));

% Setup Y = [X, Z; Z^T diag(Z)]
Y11 = Y.slice([1,   1],   [n+1,   n+1]);
Y21 = Y.slice([n+1, 1],   [2*n+1, n+1]);
Y22 = Y.slice([n+1, n+1], [2*n+1, 2*n+1]);

S = Matrix.sparse(n, n, 1:n, 1:n, ones(1,n));
M.constraint( Expr.sub(Expr.mulElm(S,Y21), Y22), Domain.equalsTo(0.0) );
M.constraint( Expr.sub(X, Y11), Domain.equalsTo(0.0) );

% t^n <= (Z11*Z22*...*Znn)
z = M.variable(n, Domain.unbounded());
for i=1:n,
    M.constraint( Expr.sub(z.index(i), Y22.index(i,i)), ...
                  Domain.equalsTo(0.0) );
end