[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a small fix for hist.m
From: |
Ben Abbott |
Subject: |
Re: a small fix for hist.m |
Date: |
Wed, 01 Dec 2010 08:24:52 -0500 |
On Nov 30, 2010, at 10:39 PM, Doug Stewart wrote:
> On Tue, Nov 30, 2010 at 9:33 PM, Doug Stewart <address@hidden> wrote:
>> On Tue, Nov 30, 2010 at 9:19 PM, Ben Abbott <address@hidden> wrote:
>>> On Nov 30, 2010, at 7:35 PM, Doug Stewart wrote:
>>>
>>>> I am now retired from teaching, and am going to spend some time
>>>> improving the help section of some M files.
>>>>
>>>> I am learning as I go so please go easy on me :-)
>>>>
>>>>
>>>> I have got hg working.
>>>> I have got the tip and made a change to hist.m
>>>> I have attached the diff file.
>>>>
>>>> I am also suppose to create one more document about the changes.
>>>> Can someone show me how to do this last part
>>>>
>>>> Doug Stewart
>>>>
>>>> PS. This is just a small fix for me to learn on.
>>>> <hist.diff>
>>>
>>>
>>> I see one minor format mistake. The output and equals sign should be
>>> enclosed in the curly brackets.
>>>
>>> Forgive the micro-management, but I assume you'll be adding the various
>>> modes of operation as well. Perhaps something like ...
>>>
>>> ## @deftypefn {Function File} {} hist (@var{y})
>>> ## @deftypefnx {Function File} {} hist (@var{y}, @var{x})
>>> ## @deftypefnx {Function File} {} hist (@var{y}, @var{nbins})
>>> ## @deftypefnx {Function File} {} hist (@var{y}, @var{x}, @var{norm})
>>> ## @deftypefnx {Function File} {[nn, xx] =} hist (@dots{})
>>>
>>> Ben
>>>
>>
>> Thank you Ben for the help (mico-managment :-) )
>> Yes after I get the process figured out I hope to do much more.
>> And yes I do know about passing the colors through to bar()
>>
>> I will resubmit this one.
>> Doug
>
> here is the new diff
> Is there anything else I should do?
> <hist.diff>
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
Description: Adobe PDF document
- Re: a small fix for hist.m,
Ben Abbott <=
Re: a small fix for hist.m, Doug Stewart, 2010/12/01