|
From: | ciccero |
Subject: | Re: hist3 statistics 1.2.4 |
Date: | Fri, 6 May 2016 07:59:13 -0700 (PDT) |
On 6 May 2016 at 05:02, ciccero <[hidden email]> wrote:I don't know why you say this is wrong. It looks right to me. I think
> 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');
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ë
If you reply to this email, your message will be added to the discussion below:http://octave.1599824.n4.nabble.com/hist3-statistics-1-2-4-tp4676721p4676789.html
[Prev in Thread] | Current Thread | [Next in Thread] |