title: Organizing data to use Graphshortestpath Function - Matlab
body: <p>I know the concept behind <em>Graphshortestpath Function</em> in Matlab however I have to re-code this portion to connect the path again.</p>
  
  <pre><code>W = [44.35 45.84 41.19 23.81 59.86 68.63 29.99 24.13 47.3 30.36 500];
  DG = sparse([1 2 3 4 5 6 7 8 9 10 11],[2 3 4 5 6 7 8 9 10 11 1],W);
  UG = tril(DG + DG');
  </code></pre>
  
  <p>Is there other way that I can make my life easier?? I have a huge data that require to input into the system and my data are in Excel format. I can't possibly re-code this every single time. Really appreciate your help! Thanks :)</p>