title: How to call matlab self defined function with c++ code
body: <p>If I define the <code>add(a,b)</code> function in matlab file <code>add.m</code>,how can I call it from c++ code?
  one simple example like this:
  add.m:</p>
  
  <pre><code>function y=add(a,b)
  y=a+b;
  end
  </code></pre>
  
  <p>c++ code:</p>
  
  <pre><code>int main(){
  // call add(a,b) ?
  }
  </code></pre>
  
  <p>Acturally, I need to use more compilicate matlab function,like <code>cp2tform()</code> and <code>imtransform()</code> in my cpp code.</p>