|
From: | Michael D. Godfrey |
Subject: | Re: Matlab logical test case |
Date: | Fri, 28 Feb 2014 23:20:04 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 02/28/2014 05:12 PM, Rik wrote:
Almost right. logical(X) applies for logical, int32, int64, single, double, and complex of2/28/14 Could someone run the following in Matlab? x = [-1, 0, i] logical (x) According to the documentation this should produce an error, while Octave happily converts any non-zero value including 'i' to true. --Rik
any size or shape. But not char of any length. This seems appropriate. This could be made clear in the documentation which does not mention any restriction on X. Michael
[Prev in Thread] | Current Thread | [Next in Thread] |