Reputation: 371
I'm writing a Matlab object oriented program and the program is now getting to over 1000 lines. I want to move parts of the script to other .m
files for easier maintenance.
Is there a way of doing this?
Upvotes: 1
Views: 541
Reputation: 9592
No question, it is as well a matter of taste whether you put methods in a class folder or one class file. Regarding clarity I opt for the one class file approach.
Classes growing that large, might be a target for refactoring. Smaller classes are easier to maintain, document and test.
Upvotes: 2
Reputation: 125854
You can create a class folder, then place each of the methods for the class in a separate file in this folder (instead of in one large file).
Upvotes: 3