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: meshBoundary.m
    path of file: ./repos/matGeom/matGeom/meshes3d
    
    the code of the file until where you have to start completion: function polyList = meshBoundary(varargin)
%MESHBOUNDARY Boundary of a mesh as a collection of 3D line strings.
%
%   CURVES = meshBoundary(V, F)
%
%   Example
%     % Example 1
%     % create centered icosahedron
%     [v, f] = createIcosahedron;
%     v(:,3) = v(:,3) - mean(v(:,3));
%     % convert to simili-sphere
%     [v2, f2] = subdivideMesh(v, f, 3);
%     v3 = normalizeVector3d(v2);
%     % clip with plane
%     plane = createPlane([0 0 0], [-1 -2 3]);
%     [vc, fc] = clipMeshVertices(v3, f2, plane, 'shape', 'plane');
%     figure; drawMesh(vc, fc); axis equal; view(3);
%     % draw mesh boundary
%     curves = meshBoundary(vc, fc);
%     hold on; drawPolygon3d(curves{1}, 'linewidth', 2, 'color', 'b');
%
%     % Example 2
%     mesh = readMesh('mushroom.off');
%     plane = createPlane([0 0 0.7], [-1 -2 3]);
%     mesh = clipMeshVertices(mesh, plane, 'shape', 'plane');
%     curves = meshBoundary(mesh);
%     figure; drawMesh(mesh); axis equal; view(3);
%     cellfun(@(x) drawPolygon3d(x, 'linewidth', 2, 'color', 'b'), curves)
%
%   See also 

    
function polyList = meshBoundary(varargin)
%MESHBOUNDARY Boundary of a mesh as a collection of 3D line strings.
%
%   CURVES = meshBoundary(V, F)
%
%   Example
%     % Example 1
%     % create centered icosahedron
%     [v, f] = createIcosahedron;
%     v(:,3) = v(:,3) - mean(v(:,3));
%     % convert to simili-sphere
%     [v2, f2] = subdivideMesh(v, f, 3);
%     v3 = normalizeVector3d(v2);
%     % clip with plane
%     plane = createPlane([0 0 0], [-1 -2 3]);
%     [vc, fc] = clipMeshVertices(v3, f2, plane, 'shape', 'plane');
%     figure; drawMesh(vc, fc); axis equal; view(3);
%     % draw mesh boundary
%     curves = meshBoundary(vc, fc);
%     hold on; drawPolygon3d(curves{1}, 'linewidth', 2, 'color', 'b');
%
%     % Example 2
%     mesh = readMesh('mushroom.off');
%     plane = createPlane([0 0 0.7], [-1 -2 3]);
%     mesh = clipMeshVertices(mesh, plane, 'shape', 'plane');
%     curves = meshBoundary(mesh);
%     figure; drawMesh(mesh); axis equal; view(3);
%     cellfun(@(x) drawPolygon3d(x, 'linewidth', 2, 'color', 'b'), curves)
%
%   See also 
%     meshes3d, meshBoundaryEdgeIndices, meshBoundaryVertexIndices
%

% ------
% Author: David Legland
% E-mail: david.legland@inrae.fr
% Created: 2019-05-01, using Matlab 8.6.0.267246 (R2015b)
% Copyright 2019-2023 INRA - Cepia Software Platform

[vertices, edges, faces] = parseMeshData(varargin{:});

% Compute edge-vertex map if not specified
if isempty(edges)
    edges = meshEdges(vertices, faces);
end