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: arGewekePlot.m
    path of file: ./repos/d2d/arFramework3/MCMC
    
    the code of the file until where you have to start completion: % function arGewekePlot([a,b,chain])
% Plots Geweke's diagnostic for increasing number o
%
%   a       Bound for lower fraction of chain       [0.1]
%   b       Bound for upper fraction of chain       [0.5]
%   chain   sample of MCMC chain analysed           [ar.ps]
%
% See also ARGEWEK
    
function arGewekePlot([a,b,chain])
% Plots Geweke's diagnostic for increasing number o
%
%   a       Bound for lower fraction of chain       [0.1]
%   b       Bound for upper fraction of chain       [0.5]
%   chain   sample of MCMC chain analysed           [ar.ps]
%
% See also ARGEWEKE
%
% Code based on published code by Marko Laine (2006): MCMC toolbox for Matlab
% http://helios.fmi.fi/~lainema/mcmc/#sec-2

function zz=arGewekePlot(varargin)
%GEWEKEPLOT Plot Geweke's diagnostic
% gewekeplot(chain) plots Geweke's diagnostic for increasing number of 
% iterations. See arGeweke.m

% ML, 2002
% $Revision: 1.3 $  $Date: 2003/05/07 12:22:19 $

global ar

a = 0.1;
b = 0.5;

% Read out given variables
if nargin > 2
	chain = varargin{3};
else
    chain = ar.ps;
end