[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: logical vectors and statistics functions
From: |
Thorsten Meyer |
Subject: |
Re: logical vectors and statistics functions |
Date: |
Wed, 09 Feb 2011 22:11:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20101227 Icedove/3.0.11 |
On 02/09/2011 09:51 PM, John W. Eaton wrote:
> are porting code to Octave and expect the Matlab behavior. So could
> someone please check to see what Matlab does for
>
> x = rand (10,1) > 0.5;
> class (x)
in Matlab R2009b:
ans = logical
> m = mean (x)
> class (m)
ans = double
also mean (single) is single, mean(integer) is double.
regards
Thorsten