Classdef: Difference between revisions

397 bytes added ,  15 June 2015
immutable property set access not supported in 4.0.0
(array of classdef objects)
(immutable property set access not supported in 4.0.0)
Line 21: Line 21:
cc = {c, c};  % ok
cc = {c, c};  % ok
</source>
</source>
* [http://www.mathworks.com/help/releases/R2015a/matlab/matlab_oop/mutable-and-immutable-properties.html Immutable property] set access. Example:
<source lang="octave">
classdef MyClass < handle
    properties (SetAccess = immutable)
        x
    end
    methods
        function obj = MyClass()
            x = rand();
        end
    end
end
</source>
Use "private" properties as workaround.


==== supported ====
==== supported ====
14

edits