title: Calculating energy using MATLAB
body: <p>Energy, which is as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/yYKzi.png" alt="Enter image description here"></p>
  
  <p>can be found based on the <a href="http://en.wikipedia.org/wiki/MATLAB" rel="nofollow noreferrer">MATLAB</a> documentation using:</p>
  
  <pre><code>stats = graycoprops(glcm, properties)
  </code></pre>
  
  <p>For example, I typed this:</p>
  
  <pre><code>&gt;&gt; a = [1 2; 3 4]
  
  a =
  
       1     2
       3     4
  
  &gt;&gt; stats = graycoprops(a, {'energy'})
  
  stats =
  
      Energy: 0.3000
  </code></pre>
  
  <p>If we want to do this <em>manually</em>, how did we get the <strong>energy</strong> value shown above?</p>
  
  <p>This is the part I didn't get clearly.</p>