[Top][All Lists]

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

Re: Index expressions: .* vs &

From: Judd Storrs
Subject: Re: Index expressions: .* vs &
Date: Sun, 8 Aug 2010 11:51:17 -0400

On Fri, Aug 6, 2010 at 4:43 AM, Mike B. <address@hidden> wrote:
I wasn't aware there is a difference. Thought that octave treated a real-type zero as a boolean.

If you want, you can explicitly cast z1 to a logical:

z2( logical(z1) ) = 1

I assume this makes an intermediate "copy" of z1 even if the logical version is not written to? i.e. logical(z1) isn't just a different "view" of the z1 data array.


reply via email to

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