[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #8801] add support for the histogram and h
From: |
Nicholas Jankowski |
Subject: |
[Octave-patch-tracker] [patch #8801] add support for the histogram and histcounts functions |
Date: |
Mon, 9 Aug 2021 19:28:00 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 |
Follow-up Comment #14, patch #8801 (project octave):
running through a few examples from the matlab help, i think at least Philip's
version is not quite compatible yet. (i'm not set up to compile octave to
test, so can't say whether the c version works) e.g.,:
Matlab doc:
X = [2 3 5 7 11 13 17 19 23 29];
[N,edges] = histcounts(X,6)
N = 1×6
2 2 2 2 1 1
edges = 1×7
0 4.9000 9.8000 14.7000 19.6000 24.5000 29.4000
Octave:
X = [2 3 5 7 11 13 17 19 23 29];
[N,edges] = histcounts(X,6)
N =
3 1 2 2 1 1
edges =
Columns 1 through 6:
2.0000 6.5000 11.0000 15.5000 20.0000 24.5000
Column 7:
29.0000
Matlab docs:
X = primes(100);
[N,edges] = histcounts(X, 'Normalization', 'probability')
N = 1×4
0.4000 0.2800 0.2800 0.0400
edges = 1×5
0 30 60 90 120
Octave:
X = primes(100);
[N,edges] = histcounts(X, 'Normalization', 'probability')
N =
0.4400 0.2800 0.2800
edges =
2.0000 33.6667 65.3333 97.0000
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?8801>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/