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: planePosition.m
    path of file: ./repos/matGeom/matGeom/geom3d
    
    the code of the file until where you have to start completion: function [pos, zp] = planePosition(point, plane)
%PLANEPOSITION Compute position of a point on a plane.
%
%   COORDS2D = planePosition(POINT, PLANE)
%   POINT has format [X Y Z], and plane has format
%   [X0 Y0 Z0  DX1 DY1 DZ1  DX2 DY2 DZ2], where :
%   - (X0, Y0, Z0) is a point belonging to the plane
%   - (DX1, DY1, DZ1) is a first direction vector
%   - (DX2, DY2, DZ2) is a second direction vector
%   Result COORDS2D has the form [XP YP], with XP and YP the coordinates of
%   the point in the coordinate system of the plane.
%
%   [COORDS2D, Z] = planePosition(POINT, PLANE)
%   Also returns the coordinates along the normal of the plane. When the
%   point is within the plane, this coordinate should be zero.
%
%   Example
%     plane = [10 20 30  1 0 0  0 1 0];
%     point = [13 24 35];
%     pos = planePosition(point, plane)
%     pos = 
%         3   4
%
%   Example
%     % plane with non unit direction vectors
%     p0 = [30 20 10]; v1 = [2 1 0]; v2 = [-2 4 0];
%     plane = [p0 v1 v2];
%     pts = [p0 ; p0 + v1 ; p0 + v2 ; p0 + 3 * v1 + 2 * v2];
%     pos = planePosition(pts, plane)
%     pos = 
%          0     0
%          1     0
%          0     1
%          3     2
%
%
%   See also 
%     geom3d, planes3d, points3d, planePoint
%

% ------
% Author: David Legland 
% E-mail: david.legland@inrae.fr
% Created: 2005-02-21
% Copyright 2005-2023 INRA - TPV URPOI - BIA IMASTE

% size of input arguments
npl = size(plane, 1);

    
function [pos, zp] = planePosition(point, plane)
%PLANEPOSITION Compute position of a point on a plane.
%
%   COORDS2D = planePosition(POINT, PLANE)
%   POINT has format [X Y Z], and plane has format
%   [X0 Y0 Z0  DX1 DY1 DZ1  DX2 DY2 DZ2], where :
%   - (X0, Y0, Z0) is a point belonging to the plane
%   - (DX1, DY1, DZ1) is a first direction vector
%   - (DX2, DY2, DZ2) is a second direction vector
%   Result COORDS2D has the form [XP YP], with XP and YP the coordinates of
%   the point in the coordinate system of the plane.
%
%   [COORDS2D, Z] = planePosition(POINT, PLANE)
%   Also returns the coordinates along the normal of the plane. When the
%   point is within the plane, this coordinate should be zero.
%
%   Example
%     plane = [10 20 30  1 0 0  0 1 0];
%     point = [13 24 35];
%     pos = planePosition(point, plane)
%     pos = 
%         3   4
%
%   Example
%     % plane with non unit direction vectors
%     p0 = [30 20 10]; v1 = [2 1 0]; v2 = [-2 4 0];
%     plane = [p0 v1 v2];
%     pts = [p0 ; p0 + v1 ; p0 + v2 ; p0 + 3 * v1 + 2 * v2];
%     pos = planePosition(pts, plane)
%     pos = 
%          0     0
%          1     0
%          0     1
%          3     2
%
%
%   See also 
%     geom3d, planes3d, points3d, planePoint
%

% ------
% Author: David Legland 
% E-mail: david.legland@inrae.fr
% Created: 2005-02-21
% Copyright 2005-2023 INRA - TPV URPOI - BIA IMASTE

% size of input arguments
npl = size(plane, 1);
npt = size(point, 1);

% check inputs have compatible sizes
if npl ~= npt && npl > 1 && npt > 1
    error('geom3d:planePosition:inputSize', ...
        'plane and point should have same size, or one of them must have 1 row');
end