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: illpar.m
    path of file: ./repos/Image-Harmonization-Dataset-iHarmony4/Xue et al/dependency/optprop/optutil
    
    the code of the file until where you have to start completion: function z=illpar(msg,varargin)
%ILLPAR Return illegal parameter error struct.

% Part of the OptProp toolbox, $Version: 2.1 $
% Author:  Jerker Wågberg, More Research & DPC, Sweden
% Email: ['jerker.wagberg' char(64) 'more.se']

% $Id: illpar.m 23 2007-01-28 22:55:34Z jerkerw $

    
function z=illpar(msg,varargin)
%ILLPAR Return illegal parameter error struct.

% Part of the OptProp toolbox, $Version: 2.1 $
% Author:  Jerker Wågberg, More Research & DPC, Sweden
% Email: ['jerker.wagberg' char(64) 'more.se']

% $Id: illpar.m 23 2007-01-28 22:55:34Z jerkerw $

	if isstruct(msg)
		msg=regexprep(msg.message,'^Error using ==> .*\n','');
	else
		msg=sprintf(msg,varargin{:});
		end