help-octave
[Top][All Lists]
Advanced

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

Re: result of prod(zero(0,3))


From: Henry F. Mollet
Subject: Re: result of prod(zero(0,3))
Date: Sat, 30 Sep 2006 20:05:00 -0700
User-agent: Microsoft-Entourage/11.1.0.040913

Same on 2.1.17.
Henry

[~] -bash-2.05b 501$ octave
GNU Octave, version 2.1.71 (powerpc-apple-darwin8.1.0).
octave:1> zeros(0,3)
ans = [](0x3)
octave:2> prod(zeros(0,3))
ans =

  1  1  1

octave:3> 



on 9/29/06 8:04 PM, Donald J Bindner at address@hidden wrote:

> On Sat, Sep 30, 2006 at 02:38:31AM +0200, David Bateman wrote:
>> Just a question for someone who has matlab available. The result of
>> prod(zeros(0,3)) shocks me on that my feeling is it should be an empty
>> matrix of size [](0x1), but the result is [1 1 1]!! Is this some crazy
>> matlab compatibility thing ? What does matlab give for the above?
> 
> It gives [ 1 1 1 ] in fact.
> 
> Don




reply via email to

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