MATLAB code packaging

In a recent question, β€œ How do I organize MATLAB code? ” Andrew Janke mentioned in his answer, using classes to organize MATLAB functions in packages:

... consider rewriting some code as objects using the stateless utility classes using class methods and private functions as methods to work together and provide some encapsulation .... In classic MATLAB classes, this is your only way to do some packages .

Could you provide more information about this? Links, code examples to understand the concept.

+3
source share
2 answers

Do not use classes for packaging.

Classes in Matlab are known for using limitaitons (starting with performance , etc.). Before moving on to using OOP in MATLAB, first study the β€œ+” packaging (ie, not β€œ@” or pens).

import foo.bar , ( ).

: , , MATLAB. OOP MATLAB , OOP Mathworks "". parfor, , .

+2

Source: https://habr.com/ru/post/1734323/


All Articles