title: Convert edge list to adjacency matrix
body: <p>if i have the following code in matlab </p>
  
  <pre><code>function adj=edgeL2adj(el)
  nodes=sort(unique([el(:,1) el(:,2)])); % get all nodes, sorted
  adj=zeros(numel(nodes));   % initialize adjacency matrix
  % across all edges
  for i=1:size(el,1);adj(find(nodes==el(i,1)),find(nodes==el(i,2)))=el(i,3);
  end
  </code></pre>
  
  <p>that convert edge list <code>m x 3</code> to adjacency list <code>n x n</code> but i have a matrix of edge list <code>m x 2</code> so what is the required change in previous code that give me true result.</p>
  
  <p>example:</p>
  
  <pre><code>if edge list =[1 2;2 3;2 4] then adjacency matrix=[0 1 0 0;0 0 1 1;0 0 0 0; 0 0 0 0]
  </code></pre>