octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another request for classdef test in Matlab


From: Michael Goffioul
Subject: Re: Another request for classdef test in Matlab
Date: Sat, 5 Jan 2013 16:23:24 -0500

Last test request. With the following class:

classdef ClassA
  properties
    x = 1;
  end
  methods
    function obj = ClassA (x)
      if nargin > 0
        obj.x = x;
      end
    end
  end
end

Execute the following at the prompt:

a(2,2) = ClassA(2)
b = a
c = a(1,1)
c.x = 3
a(1,1).x, b(1,1).x, c.x
a(1,1).x = 4
a(1,1).x, b(1,1).x, c.x

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]