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: convert.m
    path of file: ./repos/chebfun/@ultraS
    
    the code of the file until where you have to start completion: function S = convert(A, K1, K2)
%CONVERT   Conversion (transformation) operator for Ultraspherical method.
%   S = CONVERT(A, K1, K2) returns the operators that maps a vector of C^{(K1)}
%   coefficients to C^{(K2)} coefficients, where C^{(K)} is the ultraspherical
%   polynomial basis with parameter K.

    
function S = convert(A, K1, K2)
%CONVERT   Conversion (transformation) operator for Ultraspherical method.
%   S = CONVERT(A, K1, K2) returns the operators that maps a vector of C^{(K1)}
%   coefficients to C^{(K2)} coefficients, where C^{(K)} is the ultraspherical
%   polynomial basis with parameter K.
%
%   S = CONVERT(A, 0, K2) returns the operator that maps Chebyshev T
%   coefficients of ultraspherical C^{(K2)} coefficients.

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

if ( nargin < 3 )
    K2 = A.outputSpace;
end