[scilab-Users] Question about histograms
Samuel Gougeon
Samuel.Gougeon at univ-lemans.fr
Wed May 19 10:44:05 CEST 2010
Hello Mathieu,
----- Message d'origine -----
De : Mathieu Dubois
Date : 19/05/2010 09:49:
>
>>> the documentation of the dsearch and histplot functions says that "the
>>> classes are defined by C1 = [x(1), x(2)] and Ci = ( x(i), x(i+1)] for i
>>> >= 2". I was wondering why the first class is different. Is there any
>>> reason?
>>
>> An interval defined as [...] is not the same as (...]
> Yes I know about the notation!
I did not. So, i learnt it thanks to François's pointer.
> My question was why is it like that?
>
> For instance in matlab, the histc function "counts the value x(i) [in
> n(k)] if edges(k) <= x(i) < edges(k+1). The last bin counts any values
> of x that match edges(end)".
So, Matlab uses Ci = [ x(i), x(i+1) ) for i=1 to n-2, and Cn-1 =
[x(n-1), x(n)]
So, i would be wondering about why the _last_ class is different...
But may be i did not catch your point.
>
> This seems a more natural definition to me...
Because you are likely a user coming from Matlab. IMO, both definitions
are symetricaly "natural", mainly with respect to the user's background.
Best regards
Samuel
More information about the users
mailing list