title: Define a function in a matlab's shell session
body: <p>I know that in matlab, functions are supposed to live in their own file. But what about matlab shell? Is there a way to define function in the shell?</p>
  
  <p>I am asking because I am using matlab in org-mode in emacs, and all my code has to be executed my a session, as a result I cannot define functions, which very annoying to say the least.</p>
  
  <p>Any help will be appreciated!</p>