[Top][All Lists]

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

Re: Index expressions: .* vs &

From: Mike B.
Subject: Re: Index expressions: .* vs &
Date: Sun, 8 Aug 2010 17:47:39 -0700 (PDT)

Thanks Judd & Carlo for the inputs.

--- On Mon, 9/8/10, Judd Storrs <address@hidden> wrote:

From: Judd Storrs <address@hidden>
Subject: Re: Index expressions: .* vs &
To: address@hidden
Cc: "c." <address@hidden>, "Octave mai. lis." <address@hidden>
Date: Monday, 9 August, 2010, 1:51 AM

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]