MATLAB: Is it possible to implement a class with one MATLAB file for properties and others methods in a ‘@’ directory in MATLAB 7.6 (R2008a)

folderMATLABmcosoopprivate

I have a class called TestClass implemented in a classdef file "TestClass.m". However, the class has many methods and the classdef file is unreadable. I would like to implement some of these methods as separate MATLAB files in a directory named @TestClass.

Best Answer

It is possible for a classdef MATLAB file to be used in conjunction with a set of methods in a '@' directory provided that the classdef file "TestClass.m" is in the @TestClass directory.
If "TestClass.m" is in a separate directory on the MATLAB path, MATLAB 7.6 will no longer treat the MATLAB files in @TestClass as methods of TestClass, and they will not be accessible.