Class Objects Usage

Michael Goffioul michael.goffioul at gmail.com
Tue Jul 8 14:10:01 CDT 2008


On Tue, Jul 8, 2008 at 6:07 PM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> I don't know what is causing the problem for you.  Here is what I see
> with your function and a copy of Octave built from the current
> sources:
>
>  octave:1> x = polynom
>  octave:2> class (x)
>  ans = polynom
>  octave:3> which polynom
>  which: `polynom' is the function from the file /scratch/jwe/build/octave/@polynom/polynom.m
>  octave:4> type polynom
>  polynom is the function defined from the file
>  /scratch/jwe/build/octave/@polynom/polynom.m:
>
>  % Polynom script
>  function p = polynom(a)
>
>  % Polynom constructor
>
>  if nargin == 0
>     p.c = [];
>     p = class(p, 'polynom');
>  elseif isa(a,'polynom')
>     p = a;
>  else
>     p.c = a(:).';
>     p = class(p, 'polynom');
>  end
>  octave:5> methods ("polynom")
>  Methods for class polynom:
>
>  polynom
>
>
> I'm using a Debian system.  If this problem is specific to Windows,
> then someone who uses Windows will have to help debug it.

I can reproduce the problem. I'll have a look.

Michael.


More information about the Octave-maintainers mailing list