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: HELP_curveToEdgeList.m
    path of file: ./repos/GIBBON/docs
    
    the code of the file until where you have to start completion: %% curveToEdgeList
% Below is a demonstration of the features of the |curveToEdgeList| function

%%
clear; close all; clc;

%% Syntax
% |[E]=curveToEdgeList(N);|

%% Description 
% This function creates an edge array E for the input curve de
    
function

%%
clear; close all; clc;

%% Syntax
% |[E]=curveToEdgeList(N);|

%% Description 
% This function creates an edge array E for the input curve defined by N.
% The input parameter N can be of the following type: 
% * A single scalar
% In this case it is assumed N defines the number of points on the curve
% * An nxm array representing n points and m dimensions, in this case it is
% assumed N represents the vertex array for the curve
% * A row or column array, in this case it is assumed that N defines the
% indices for the points defining the curve. 
% 
% If closeCurveOpt=1 it is assumed the start and end