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: ss2tf.m
    path of file: ./repos/MataveControl/matave/+mc
    
    the code of the file until where you have to start completion: % Transform state space model to transfer function 
% Input: sys
% Example 1: G = mc.ss2tf(sys)
% Au
    
function 
% Input: sys
% Example 1: G = mc.ss2tf(sys)
% Author: Daniel MÃ¥rtensson, 2017 September

function [G] = ss2tf(varargin)
  % Check if there is some input arguments or it's not a state space model
  if(or(isempty(varargin{1}), ~strcmp(varargin{1}.type, 'SS' )))
    error ('Missing state space model')
  end