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: tal2mni.m
    path of file: ./repos/CanlabCore/CanlabCore/Image_space_tools
    
    the code of the file until where you have to start completion: function outpoints = tal2mni(inpoints)
% Converts coordinates to MNI brain best guess
% from Talairach coordinates
%
% :Usage:
% ::
%
%     outpoints = tal2mni(inpoints)
%
% Where inpoints is N by 3 or 3 by N matrix of coordinates
% (N being the number of points)
%
% :Output:

    
function outpoints = tal2mni(inpoints)
% Converts coordinates to MNI brain best guess
% from Talairach coordinates
%
% :Usage:
% ::
%
%     outpoints = tal2mni(inpoints)
%
% Where inpoints is N by 3 or 3 by N matrix of coordinates
% (N being the number of points)
%
% :Output:
%
%   **outpoints:**
%        is the coordinate matrix with MNI points
%
% ..
%    Matthew Brett 2/2/01
% ..

dimdim = find(size(inpoints) == 3);
if isempty(dimdim)
  error('input must be a N by 3 or 3 by N matrix')
end