title: Creating a new matrix in R using old matrix values as exponents
body: <p>If I have a matrix mat1</p>
  
  <pre><code>     [,1] [,2] [,3]
  [1,]    1    3    5
  [2,]    2    4    6
  </code></pre>
  
  <p>it is possible via a very simple command to square all individual values by</p>
  
  <pre><code>mat1 * mat1
  
       [,1] [,2] [,3]
  [1,]    1    9   25
  [2,]    4   16   36
  </code></pre>
  
  <p>Now, what I want to do is to create a new matrix where all values are computed by <code>e^(old_value</code>), e.g., <code>e^1</code>, <code>e^2</code>, <code>e^3</code> and so forth. How can I do this?</p>