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: nyquist.m
    path of file: ./repos/MataveControl/matave/+mc
    
    the code of the file until where you have to start completion: % Plot the nyquist diagram of a state space model or a transfer function 
% between given frequencies w1 and w2
% Input: sys, G
% Example 
    
function 
% between given frequencies w1 and w2
% Input: sys, G
% Example 1:  mc.nyquist(sys, w1, w2)
% Example 2:  mc.nyquist(G, w1, w2)
% Author: Daniel MÃ¥rtensson, 2017 Oktober

function [reval] = nyquist(varargin)
  % Check if there is any input
  if(isempty(varargin))
    error('Missing model')
  end