Is there a way to define static member variables in MATLAB classes?
This doesn\'t work:
classdef A
properties ( Static )
m = 0;
end
(just to inform) there is (another?) way to create static-like data in matlab
suppose that you have a "handle" class which its name is "car" if you want the car class to have static data, you could construct another handle class and use it in car class throw composition, the latter class works as a static data for car class
classdef car
this way when you create first instance of a car class, an instance of STATIC_DATA_HOLDER will be created and when you create second instance of car class it uses previously created STATIC_DATA_HOLDER class.
these code tested with "MATLAB 2013b"