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: savesdpafile.m
    path of file: ./repos/YALMIP/extras
    
    the code of the file until where you have to start completion: function solution = savesdpafile(varargin)
%SAVESDPAFILE Saves a problem definition in the SDPA format
%
%    SAVESDPAFILE(F,h,'filename')    Saves the problem min(h(x)), F(x)>0 to the file filename
%    SAVESDPAFILE(F,h)               A "Save As" - box will be opened                               
%

    
function solution = savesdpafile(varargin)
%SAVESDPAFILE Saves a problem definition in the SDPA format
%
%    SAVESDPAFILE(F,h,'filename')    Saves the problem min(h(x)), F(x)>0 to the file filename
%    SAVESDPAFILE(F,h)               A "Save As" - box will be opened                               
%
% Note the the SDPA format does not support SOCPs or equalities.
% Equalities will be eliminated using double-sided inequalities. If the
% model contains SOCP constraints the command will exit.

F = varargin{1};
h = varargin{2};
nvars = yalmip('nvars');

if isa(F,'constraint')
    F = lmi(F);
end