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: getorthoviewpos.m
    path of file: ./repos/fieldtrip/fileio/private
    
    the code of the file until where you have to start completion: function pos = getorthoviewpos(pos, coordsys, viewpoint)

% GETORTHOVIEWPOS obtains the orthographic projections of 3D positions
% based on a given coordinate system and viewpoint

    
function pos = getorthoviewpos(pos, coordsys, viewpoint)

% GETORTHOVIEWPOS obtains the orthographic projections of 3D positions
% based on a given coordinate system and viewpoint
%
% Use as
%   getorthoviewpos(pos, coordsys, viewpoint)
%
% For example
%   getorthoviewpoint(pos, 'mni', 'superior')
%
% See alo SETVIEWPOINT, COORDSYS2LABEL

if size(pos,2)~=3
  ft_error('XYZ coordinates are required to obtain the orthographic projections based on a viewpoint')
end