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: printOptions.m
    path of file: ./repos/chebfun/@chebguiExporterEIG
    
    the code of the file until where you have to start completion: function printOptions(fid, expInfo)

    
function printOptions(fid, expInfo)
%PRINTOPTIONS   Print problem options when they are exported.
%
% Calling sequence:
%   PRINTOPTIONS(FID, EXPINFO)
% where
%   FID:        ID of a file-writing stream.
%   EXPINFO:    Struct containing information for printing the problem.

% Copyright 2017 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.

% Extract info from the expInfo struct:
K = expInfo.K;
discretization = expInfo.discretization;

% Set up preferences
fprintf(fid, '\n%%%% Setup preferences for solving the problem.\n');
fprintf(fid, '%% Create a CHEBOPPREF object for passing preferences.\n');
fprintf(fid, '%% (See ''help cheboppref'' for more possible options.)\n');
fprintf(fid, 'options = cheboppref();\n');

% Option for discretization:
fprintf(fid, '\n%% Specify the discretization to use. Possible options are:\n');
fprintf(fid, '%%  ''values'' (default)\n');
fprintf(fid, '%%  ''coeffs''\n');
fprintf(fid, '%%  A function handle (see ''help cheboppref'' for details).\n');
fprintf(fid, 'options.discretization = ''%s'';\n', discretization);

% Specify number of eigenvalues to compute:
fprintf(fid, '\n%% Number of eigenvalue and eigenmodes to compute.\n');
fprintf(fid, 'k = %s;\n', K);

end