title: Ploting degree distribution for a directed network
body: <p>I have a dataset for the edges and nodes I've crawled from a social networking site. How can I plot the degree distribution using the data I have in a spreadsheet? The edges are directed. I am a MATLAB beginner. Please help.</p>
  
  <p>I have created the adjacency matrix <code>adj</code> as follows:</p>
  
  <pre><code>clear all; 
  disp('Processing Edge-List File');
  A = xlsread('edges.csv');
  dim = max(max(A));
  [E_Size, junk] = size(A); 
  sprintf('The dataset has %d nodes and %d edges',dim, E_Size);
  disp('Filling Adjanceny Matrix');
  adj = sparse(A(:,1), A(:,2), ones(E_Size,1), dim, dim, E_Size);
  if(adj==adj') disp('Symmetric Adjacency Matrix - Undirected Graph') ;
  else disp('Assymmetric Adjacency Matrix - Directed Graph'); 
  </code></pre>
  
  <p>Then i tried <code>surf(adj)</code> . its giving me an empty graph . Is there a problem in the way I am creating the adjacency matrix?</p>