--- 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.