octave-maintainers
[Top][All Lists]
Advanced

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

Re: Class Objects Usage


From: Michael Goffioul
Subject: Re: Class Objects Usage
Date: Tue, 8 Jul 2008 21:10:01 +0200

On Tue, Jul 8, 2008 at 6:07 PM, John W. Eaton <address@hidden> 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.


reply via email to

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