title: Matlab method as a property
body: <p>Is there a way to write a Matlab class that has one of its own methods as a property? I'm writing simulation code in which the class's method (which is effectively a physics equation) might change in future development, so I'd like archived class instances to include the method.</p>
  
  <p>Here's some Matlab-ish pseudocode.</p>
  
  <pre><code>classdef foo
     properties
        bar % some property
        baz % a property that contains the method baz
     end
     methods
         function out = baz() % the method I want to store
            stuff
         end
     end
  end
  </code></pre>
  
  <p>Note that I want "stuff" to be somehow stored as a property so when I save an instance, I will know the version of the method I used.</p>
  
  <p>It is preferable that it is public and also not a static property. I'd like to serialize instances.</p>