octave-maintainers
[Top][All Lists]
Advanced

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

Re: Matlab logical test case


From: Juan Pablo Carbajal
Subject: Re: Matlab logical test case
Date: Sun, 2 Mar 2014 15:07:22 +0100

On Sun, Mar 2, 2014 at 10:15 AM, fgnievinski <address@hidden> wrote:
> maybe because a complex value could be argued to have two logical solutions,
> one for each real and imaginary parts, as each can be nonzero independently
> from the other part.

That argument still does not justify matlabs ranting:
> Complex values cannot be converted to logicals.

In your case
logical(complex([0;1;0;1],[0;0;1;1]))
should give
[0 0;1 0;0 1;1 1]
as an answer


reply via email to

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