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: Fri, 4 Jan 2013 22:49:55 -0500

On Fri, Jan 4, 2013 at 5:57 PM, Ben Abbott <address@hidden> wrote:
Ok. That behaves like a structure, and returns a cs-list.

Does that behavior also apply for methods?

Having the following class:

classdef ClassA < handle
  properties
    x = 1;
  end
  methods
    function obj = ClassA (x)
      if nargin > 0
        obj.x = x;
      end
    end
    function out = m1 (obj)
      disp ('m1');
      out = 0;
  end
end

What's the result of the following:

clear all
a(2,2) = ClassA (2)
a.m1()

Michael.


reply via email to

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