title: Try to calculate matrix but get RangeError (index): Index out of range: no indices are valid: 0
body: <p>I am still new with dart, so I'm trying to figure things out. Right now, I tried to create matrix and calculate using this formula.</p>
  
  <pre><code>import 'dart:math';
  ​
  void main() {
    List&lt;List&lt;double&gt;&gt; normalisasi = new List&lt;List&lt;double&gt;&gt;();
  ​
   List&lt;List&lt;double&gt;&gt; data = [
      [10000000, 35, 110, 7],
      [12000000, 45, 125, 6],
      [15000000, 40, 150, 8],
      [14000000, 37.5, 125, 7.5],
    ];
  ​
    var bobot = [0.35, 0.25, 0.15, 0.25];
  ​
    for (var i = 0; i &lt; data.length; i++) {
      for (var j = 0; j &lt; data.length; j++) {
        normalisasi[i][j] = data[i][j] / (pow(data[j][i], 2));
        print(normalisasi[i][j]);
      }
    }
  }
  </code></pre>
  
  <p>But I get this instead:</p>
  
  <blockquote>
    <p>RangeError (index): Index out of range: no indices are valid: 0</p>
  </blockquote>
  
  <p>Please help me, thank you.</p>