isa() seems to return the wrong value

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

isa() seems to return the wrong value

andy buckle
octave:1> a=2
a =  2
octave:2> isa a numeric
ans = 0
octave:3> whos
Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  =====
        a           1x1                          8  double
        ans         1x1                          1  logical

Total is 2 elements using 9 bytes


If I have understood help isa correctly, isa should have returned nonzero.

I tried to make a bug report on savannah, but I forgot by username, and I cant make a new account because it knows my email. Sorry, I am dumb.

--
/* andy buckle */

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: isa() seems to return the wrong value

shall689

You should use the following format:
isa (a,"numeric")



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: isa() seems to return the wrong value

andy buckle

On 22 September 2017 at 13:57, shall689 <[hidden email]> wrote:

You should use the following format:
isa (a,"numeric")



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

Ok. My bad.

I think I made this mistake because

whos a

is correct, taking the name of the variable as a string. comparing 
help whos
help isa

it's probably just my fault for not reading it properly. the whos help does say the Name of the variable, where the isa help does say the actual OBJECT.

--
/* andy buckle */

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave