Extraction of real components of complex matrices is counterintuitive
Reported by Stéphane MOTTELET (@mottelet)
BUG DESCRIPTION:
----------------
Extraction of real components of complex matrices is counterintuitive. For example, in the following statements
--> p=poly([1 1 1 1],"x","coeff"); r=roots(p)
r =
1.i
-1.i
-1.
--> isreal(r(3))
ans =
F
the last answer is a pity, as r(3) is numerically real (0 imaginary part). When all the extracted components are real, then the storage class of the extracted vector, which is a new object, should be real (as other software similar to Scilab do).
ERROR LOG:
----------
--> isreal(r(3))
ans =
F
should answer "T"
HOW TO REPRODUCE THE BUG:
-------------------------
OTHER INFORMATION:
------------------