help-octave
[Top][All Lists]
Advanced

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

Re: Built-in Functions inside method of a class


From: Ben Abbott
Subject: Re: Built-in Functions inside method of a class
Date: Mon, 10 Oct 2011 21:02:44 -0400

On Oct 10, 2011, at 7:06 PM, Carnë Draug wrote:

> 2011/10/10 Ben Abbott <address@hidden>:
>> Everything looks to be working for me. I'm confused how you were able to get 
>> the result you posted. Did you attached the correct files? Or you be running 
>> a version of Octave that behaves differently from mine?
> 
> Hi Ben,
> 
> thank you for looking into this. Yes, I had attached the correct
> files. Just be double check, I have downloaded the ones I had
> attached, reran them and got the same results as before. I am using
> 3.4.2 though, maybe that's why the results differ. I'll compile the
> newly released 3.4.3 and see what happens.
> 
> Carnë

Your inference is correct. I tried with the stable branch and see ...

a = testClass;
testMethod(a)
The following will use built-in susbref because it's inside a method
The following will use class susbref because it's in a function
I am in the class subsref
I am in the class subsref
loop_result = 
{
  [1,1] = 
  {
    [1,1] =  1
    [1,2] =  2
    [1,3] =  3
  }
  [1,2] = 
  {
    [1,1] =  1
    [1,2] =  2
    [1,3] =  3
  }
}
cellfun_result = 
{
  [1,1] = <class testClass>
  [1,2] = <class testClass>
}

Ben






reply via email to

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