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: readEDGE.m
    path of file: ./repos/u-shape3D/software/extern
    
    the code of the file until where you have to start completion: function [E,RP,RD] = readEDGE(filename)
  % READEDGE read .edge file used by Triangle program to output edges of
  % voronoi diagrams
  %
  % [E,RP,RD] = readedge(filename)
  % 
  % Input:
  %   filename  input file name
  %
  % Output:

    
function [E,RP,RD] = readEDGE(filename)
  % READEDGE read .edge file used by Triangle program to output edges of
  % voronoi diagrams
  %
  % [E,RP,RD] = readedge(filename)
  % 
  % Input:
  %   filename  input file name
  %
  % Output:
  %   E  #E by 2 list of voronoi internal edges
  %   RP  #RP by 1 list of voronoi infinite ray start points
  %   RD  #RP by 2 list of voronoi infinite direction vectors
  %
  % Example:
  %   D = readNODE(data_node_file);
  %   V = readNODE(voronoi_node_file);
  %   [E,RP,RD] = readEDGE(voronoi_edge_file);
  %   RD = normalizerow(RD);
  %   offset = 2*max(sqrt(sum((V(E(:,1),:)-V(E(:,2),:)).^2,2)));
  %   EX = [V(E(:,1),1),V(E(:,2),1); V(RP,1) V(RP,1)+offset*RD(:,1)]';
  %   EY = [V(E(:,1),2),V(E(:,2),2); V(RP,2) V(RP,2)+offset*RD(:,2)]';
  %   h = plot(EX,EY,'-',D(:,1),D(:,2),'.');
  %   set(h(1:end