octave-maintainers
[Top][All Lists]
Advanced

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

Re: hist3 statistics 1.2.4


From: Carnë Draug
Subject: Re: hist3 statistics 1.2.4
Date: Fri, 6 May 2016 14:11:55 +0100

On 6 May 2016 at 05:02, ciccero <address@hidden> wrote:
> Great job, with the function!!!
> But it is still returning a transpose matrix,
> if i use it without returning parameters it's show a beatifull graph(thanks
> for that, i liked) with the correct values, but if you used returning
> parameters and try to plot a surface or mesh, it is plotting wrong, only it
> is plotting ok if i plot the transpose matrix.
> i used the same first example in the function:
>
> X = [1 1; 1 1; 1 10; 1 10; 5 5; 5 5; 5 5; 5 5; 5 5; 7 3; 7 3; 7 3; 10 10; 10
> 10];
> hist3(X);
> xlabel('X');
> ylabel('Y');
> %This is right
>
> X = [1 1; 1 1; 1 10; 1 10; 5 5; 5 5; 5 5; 5 5; 5 5; 7 3; 7 3; 7 3; 10 10; 10
> 10];
> a=hist3(X);
> mesh(a);
> xlabel('X');
> ylabel('Y');
> %This is wrong, only if you use mesh(a');

I don't know why you say this is wrong.  It looks right to me.  I think
your issue comes from confusing x/y and row/column and understanding what
mesh expects when input is a matrix.  Here's the result I get from hist3:

    octave> X = [1 1; 1 1; 1 10; 1 10; 5 5; 5 5; 5 5; 5 5; 5 5; 7 3; 7
3; 7 3; 10 10; 10 10];
    octave> a = hist3 (X)
    a =

       2   0   0   0   0   0   0   0   0   2
       0   0   0   0   0   0   0   0   0   0
       0   0   0   0   0   0   0   0   0   0
       0   0   0   0   0   0   0   0   0   0
       0   0   0   0   5   0   0   0   0   0
       0   0   0   0   0   0   0   0   0   0
       0   0   3   0   0   0   0   0   0   0
       0   0   0   0   0   0   0   0   0   0
       0   0   0   0   0   0   0   0   0   0
       0   0   0   0   0   0   0   0   0   2

This result is correct and compatible with Matlab R2010b.  If you get a
different result, then please open a bug report with your Octave version
at:

    https://savannah.gnu.org/bugs/?func=additem&group=octave

Carnë



reply via email to

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