The intended behavior of the 'iscomplex' function is to indicate whether a
number has a nonzero imaginary part. This is a useful functionality, but it
is covered by the function 'isreal'. Since the complex numbers form a
superset of the reals, and octave does not seem to be using any numbers
other than these, I suggest to drop the 'iscomplex' function completely.
Muhali
I'd say there are three problems with this suggestion:
1) iscomplex is not the negation of isreal if the argument is not numeric. I believe that it is essentially:
iscomplex(x) = isnumeric(x)&~isreal(x)
2) Even if it was just the negation, I think its "nicer" in code to read "if iscomplex(x)" than "if ~isreal(x)" so I'd argue that there is some aesthetic value to keeping it.
3) Again even if it was just a negation, the function straightforward and intuitive (it returns exactly what the function name implies) and it isn't like it is taking up a lot of space. I don't see any net benefit to removing it.
Just my 2 cents.