title: Define method in a separate file with attributes in MATLAB
body: <p>As you know we can define class definition and method definition in separate files in <code>@folder</code>. How we can do that if we have attributes for method? I read in MATLAB OOP documentation that we should use this structure in method file:</p>
  
  <pre><code>classdef myClass
    method (att = value,...)
      tdata = testdata(obj,arg1,arg2)
   end 
  end
  </code></pre>
  
  <p>But we have another file (<code>myClass</code>) in this folder for class definition so if we have this structure we have two class definition files. one of them has properties definition and another has methods properties (two files with same name!). If we change above <code>classdef</code> name(myClass) to function name(testdata), we have a error in MATLAB. What should I do?</p>