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: decodevarname.m
    path of file: ./repos/iso2mesh
    
    the code of the file until where you have to start completion: function newname = decodevarname(name,varargin)
%
%    newname = decodevarname(name)
%
%    Decode a hex-encoded variable name (from encodevarname) and restore
%    its original form

    
function newname = decodevarname(name,varargin)
%
%    newname = decodevarname(name)
%
%    Decode a hex-encoded variable name (from encodevarname) and restore
%    its original form
%
%    This function is sensitive to the default charset
%    settings in MATLAB, please call feature('DefaultCharacterSet','utf8')
%    to set the encoding to UTF-8 before calling this function.
%
%    author: Qianqian Fang (q.fang <at> neu.edu)
%
%    input:
%        name: a string output from encodevarname, which converts the leading non-ascii
%              letter into "x0xHH_" and non-ascii letters into "_0xHH_"
%              format, where hex key HH stores the ascii (or Unicode) value
%              of the character.
%              
%    output:
%        newname: the restored original string
%
%    example:
%        decodevarname('x0x5F_a')   % returns _a
%        decodevarname('a_')   % returns a_ as it is a valid variable name
%        decodevarname('x0xE58F98__0xE9878F_')  % returns '变量' 
%
%    this file is part of EasyH5 Toolbox: https://github.com/NeuroJSON/easyh5
%
%    License: GPLv3 or 3-clause BSD license, see https://github.com/NeuroJSON/easyh5 for details
%

newname=name;
isunpack=1;
if(nargin==2 && ~isstruct(varargin{1}))
    isunpack=varargin{1};
elseif(nargin>1)
    isunpack=jsonopt('UnpackHex',1,varargin{:});
end