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: projlem_ss.m
    path of file: ./repos/lc_toolbox/3rdparty/+hinfcd/+standard/+projlem
    
    the code of the file until where you have to start completion: function [K, gamma] = projlem_ss(prob,opts)
% PROJLEM_SS Solves the LMI formulation of the standard problem in state-space form
%
% [K,gamma] = PROJLEM(prob) returns a descriptor realization K of the
% controller that solves the SDP formulation of the standard problem,
% i.e. for the plant Pio (after elimination of impulsive and unstable 
% weighting filters)

% This file is part of hinfcd.
% Copyright (c) 2019, Laurens Jacobs, MECO Research Team @ KU Leuven. 
% 
% hinfcd is free software: you can redistribute it and/or modify it under 
% the terms of the GNU Lesser General Public License as published by the 
% Free Software Foundation, version 3.
% 
% hinfcd is distributed in the hope that it wi
    
function sdpvars = ct_lyapunovrank_YALMIP(prob, sdpvars, opts)
    plant = sdpvars.plant; 
    
    % helpful index variables
    iscstr = [prob.specs.weight]==0;
    isobj = ~iscstr;
    nobj = sum(isobj);
    
    % define main variables
        % X, Y
        X = sdpvar(plant.nx,plant.nx,'symmetric');
        Y = sdpvar(plant.nx,plant.nx,'symmetric');
        
    % construct matrices with slack variables
        Gammaw = sdpvar(plant.nw(),plant.nw(),'symmetric');
        Gammaz = sdpvar(plant.nz(),plant.nz(),'symmetric');
        Dzw = sdpvar(plant.nz(),plant.nw(),'full');
        
        % set constant parts & replace optimization variables
        j = 1;
        for i=1:length(prob.specs)
        	if prob.specs(i).weight==0
                Gammaz(prob.specs(i).out,prob.specs(i).out) = eye(length(prob.specs(i).out)); 
            else
                Gammaz(prob.specs(i).out,prob.specs(i).out) = opts.synthesis.relaxation*sdpvars.sqgamma(j)*eye(length(prob.specs(i).out));
                j = j+1;
            end