title: Is there any difference between a mex file and a function called with coder.ceval?
body: <p><a href="https://stackoverflow.com/questions/31660743/basic-networking-with-matlab-coder">related</a></p>
  
  <p>My goal is to use a mix of C code and Matlab code, and ultimately have the whole thing run in C by using the Coder tool.
  I've found 2 ways of incorporating C into Matlab, writing a Mex file, and using coder.ceval on a C program.</p>
  
  <p>Is there any difference in these 2 methods, beyond just calling syntax?</p>