[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51556] function isreal applied on complex num
From: |
Ernst Reissner |
Subject: |
[Octave-bug-tracker] [bug #51556] function isreal applied on complex numbers with zero imaginary part |
Date: |
Mon, 24 Jul 2017 08:02:50 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 |
URL:
<http://savannah.gnu.org/bugs/?51556>
Summary: function isreal applied on complex numbers with zero
imaginary part
Project: GNU Octave
Submitted by: ernstreissner
Submitted on: Mon 24 Jul 2017 12:02:48 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
According to
https://www.mathworks.com/help/matlab/ref/isreal.html
isreal(x) determines whether a has real *type*.
Consequently, isreal(0i) is false in matlab.
also isreal([0i 1]) is just false, a single scalar value
because the type is meant, not zero imaginary part in all components.
The current usage of isreal(A)
which means imag(A) is nonzero may be substituted by
~any(imag(A)).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51556>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51556] function isreal applied on complex numbers with zero imaginary part,
Ernst Reissner <=