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: ssexport.m
    path of file: ./repos/SuiteSparse/MATLAB_Tools/SuiteSparseCollection
    
    the code of the file until where you have to start completion: function ssexport (list, check, tmp)
%SSEXPORT export to Matrix Market and Rutherford/Boeing formats
%
% Example:
%   ssexport ;          % export the entire collection
%   ssexport (list) ;   % just export matrices whose id's are given in the list
%   ssexport (list, 'check') ;      % also read them back in, to check
%
% If the list is empty, all matrices in the collection are exported.
% A 3rd argument tmp changes the tmp directory for ssread.

    
function ssexport (list, check, tmp)
%SSEXPORT export to Matrix Market and Rutherford/Boeing formats
%
% Example:
%   ssexport ;          % export the entire collection
%   ssexport (list) ;   % just export matrices whose id's are given in the list
%   ssexport (list, 'check') ;      % also read them back in, to check
%
% If the list is empty, all matrices in the collection are exported.
% A 3rd argument tmp changes the tmp directory for ssread.
%
% See also ssget, sswrite, RBio, mwrite.

% SuiteSparseCollection, Copyright (c) 2006-2019, Timothy A Davis.
% All Rights Reserved.
% SPDX-License-Identifier: GPL-2.0+

%-------------------------------------------------------------------------------
% get the input arguments
%-------------------------------------------------------------------------------

index = ssget ;
nmat = length (index.nrows) ;

if (nargin < 1 || isempty (list))
    list = 1:nmat ;
end