title: How to map ranges of values in MATLAB
body: <p>I'm hoping there is a MATLAB function similar to this Arduino function:
  <a href="http://arduino.cc/en/Reference/map" rel="nofollow noreferrer">http://arduino.cc/en/Reference/map</a></p>
  
  <p>Basically I have a time based variable with 67 data points ranging from 0 to 1.15, and I want to map that from 0 to 100% (so, 101 data points).  In Arduino that would look something like:</p>
  
  <pre><code>map(value, fromLow, fromHigh, toLow, toHigh)
  </code></pre>
  
  <p>I can use interp1 in MATLAB to get me the 101 data points, but I just get 101 data points between 0 and 1.15.  I know I can just multiply each value by 100/1.15, but this is inexact.  Is there a more elegant way to do this in MATLAB that I'm overlooking?</p>
  
  <p>(This post looked hopeful, but it's not what I'm looking for:
  <a href="https://stackoverflow.com/questions/983163/map-function-in-matlab">Map function in MATLAB?</a>)</p>
  
  <p>Thanks</p>