title: How to calculate log of matrix but ignore values that equal 0
body: <p>I have a matrix A 3x3 that has some element equal 0. And I want to calcualte log(A). But we know that log (0) is not identify. So I want to calculate log of matrix A that ignore elements equal 0. And if element equal 0. I want to set log(0) =0. How to implement it in matlab. Thank all. Example :</p>
  
  <pre><code>A=[3 2 3
     3 0 2
     4 5 0]
  Log(A)=[    1.0986    0.6931    1.0986
              1.0986      0       0.6931
              1.3863    1.6094         0]
  </code></pre>