title: Implementation of differentiation in C#
body: <p>I have the following differentiation, I need to implement it in C#:</p>
  
  <pre><code>W(t)=d/dt(log(A(t)))
  </code></pre>
  
  <p>Where <code>A(t)</code> is a array of double data.</p>
  
  <p>How can I obtain the resulting <code>W(t)</code> array from the derivative above?</p>
  
  <p>Thanks </p>
  
  <p>edit:</p>
  
  <pre><code>public double[,] derivative()
  {
      dvdt = new double[envelope.GetLength(0), envelope.GetLength(1)];
      int h = 1;
  
      for (int j = 0; j &lt; envelope.GetLength(0); j++)
      {
          for (int i = 0; i &lt; envelope.GetLength(1)-1 ; i++)
          {
              dvdt[j, i] = (envelope[j, i + h] - envelope[j, i]) / (h);
          }
      }
      return dvdt;
  }
  </code></pre>
  
  <p>I found this library <a href="http://autodiff.codeplex.com/" rel="nofollow">http://autodiff.codeplex.com/</a> but i cant understand how the sample code is working and how i can apply it to my problem eh</p>