X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Message-ID: <39BE7EA0.E8603284@umich.edu> Date: Tue, 12 Sep 2000 15:06:08 -0400 From: Eric Durant X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.soft-sys.matlab Subject: Re: if (1 | []) : inconsistencies? References: <39BE5CB1.7E8FD4E9@umich.edu> <39BE73F0.F369297A@sandia.gov> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The behavior of logical operators is defined over (scalar, empty matrix), unless I'm completely misunderstanding page 2-12 of the Function Reference. "help relops" isn't as explicit, but it implies the same thing. A "bad idea"... I'd have to agree if the behavior is undefined or improperly implemented. As I read the documentation, this is defined behavior, though. So, is it implemented improperly, or have I misread the documentation? -- Eric Durant http://edurant.com/ Erik Reckase wrote: >R12 has the same behavior, but I'm not sure exactly why. Comparing >anything with an empty matrix seems to be a bad idea to me, simply >from a programming standpoint. The logical operators are not defined >for empty matrix comparisons, right? I can't find any documentation >stating what the results of the '|' operator should be for empty >matrix values... > > -Erik