title: Elegant vectorized version of CHANGEM (substitute values) - MATLAB
body: <p>In Matlab 2012b, there is a <code>changem</code> function that allows you to substitute elements of a matrix with other values specified by a set of keys:
  <a href="http://www.mathworks.com/help/map/ref/changem.html;jsessionid=7bc502fa8e3b3db2dde50adb52bc" rel="nofollow noreferrer">Substitute values in data array</a></p>
  
  <p>Is there an elegant/vectorized way to do the same if I don't have the Mapping toolbox?</p>