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: nmt_mni2mri.m
    path of file: ./repos/fieldtrip/contrib/nutmegtrip
    
    the code of the file until where you have to start completion: function [xyz_o_mm,xyz_o_vx]=nmt_mni2mri(xyz_i,mrifullpath)
% [xyz_o_mm,xyz_o_vx]=nmt_mri2mni(xyz_i,mrifullpath,[doaffine])
% Takes MNI coordinates (mm) and converts to original MRI coordinates (mm
% and/or voxel) using normalization info from SPM8 (or SPM12 'OldNorm')
%

    
function [xyz_o_mm,xyz_o_vx]=nmt_mni2mri(xyz_i,mrifullpath)
% [xyz_o_mm,xyz_o_vx]=nmt_mri2mni(xyz_i,mrifullpath,[doaffine])
% Takes MNI coordinates (mm) and converts to original MRI coordinates (mm
% and/or voxel) using normalization info from SPM8 (or SPM12 'OldNorm')
%
% XYZ_I: Nx3 list of coords in individual's MRI coordinates (mm)
% mrifullpath: path to normalized MRI volume (nifti)
%
% [wrapper for spm_get_orig_coord from SPM8/SPM12]

if size(xyz_i,2)~=3
    error('input coords must be in N x 3 matrix');
end