octave-maintainers
[Top][All Lists]
Advanced

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

Re: a small fix for hist.m


From: Doug Stewart
Subject: Re: a small fix for hist.m
Date: Wed, 1 Dec 2010 09:06:26 -0500

On Wed, Dec 1, 2010 at 8:42 AM, Doug Stewart <address@hidden> wrote:
>>> The help text can be improved by changes such as ....
>>>
>>> -## With one vector input argument, plot a histogram of the values
>>> +## With one vector input argument, @var{y}, plot a histogram of the values
>>>
>>> If you're up to a bug fix, it looks to me like the example below does not 
>>> produce the correct result.
>>>
>>> y = randn (1, 1000);
>>> x = [0.1, 0.2, 0.5, 0.7 0.9];
>>> hist (y, x)
>>>
>>> Matlab gives the attached result. Its not immediately clear to me how the 
>>> bin widths are determined.
>>>
>>> Ben
>>> <hist.pdf>
>>
>> I need my morning coffee ... but it looks like the edges of the bins are 
>> centered between adjacent values for "x", with the outer most edges 
>> extending to encompass all values of "y".
>>
>> Ben
>>
>>
>>
>
> Wow I just looked at the PDF and was quit surprised!!
> M*L output looks wrong.
> Doug
>

I am sorry i misunderstood the question  i thought it was rand(1,1000)
but it is randn so now it makes some sense.
Doug


reply via email to

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