Mercurial > hg > octave-nkf
comparison scripts/statistics/distributions/empirical_cdf.m @ 3426:f8dde1807dee
[project @ 2000-01-13 08:40:00 by jwe]
author | jwe |
---|---|
date | Thu, 13 Jan 2000 08:40:53 +0000 |
parents | e4f4b2d26ee9 |
children | 434790acb067 |
comparison
equal
deleted
inserted
replaced
3425:8625164a0a39 | 3426:f8dde1807dee |
---|---|
1 ## Copyright (C) 1996, 1997 Kurt Hornik | 1 ## Copyright (C) 1996, 1997 Kurt Hornik |
2 ## | 2 ## |
3 ## This program is free software; you can redistribute it and/or modify | 3 ## This program is free software; you can redistribute it and/or modify |
4 ## it under the terms of the GNU General Public License as published by | 4 ## it under the terms of the GNU General Public License as published by |
5 ## the Free Software Foundation; either version 2, or (at your option) | 5 ## the Free Software Foundation; either version 2, or (at your option) |
6 ## any later version. | 6 ## any later version. |
7 ## | 7 ## |
8 ## This program is distributed in the hope that it will be useful, but | 8 ## This program is distributed in the hope that it will be useful, but |
9 ## WITHOUT ANY WARRANTY; without even the implied warranty of | 9 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 ## General Public License for more details. | 11 ## General Public License for more details. |
12 ## | 12 ## |
13 ## You should have received a copy of the GNU General Public License | 13 ## You should have received a copy of the GNU General Public License |
14 ## along with this file. If not, write to the Free Software Foundation, | 14 ## along with this file. If not, write to the Free Software Foundation, |
15 ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 15 ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
16 | 16 |
17 ## usage: empirical_cdf (X, DATA) | 17 ## usage: empirical_cdf (X, DATA) |
20 ## (CDF) at X of the empirical distribution obtained from the univariate | 20 ## (CDF) at X of the empirical distribution obtained from the univariate |
21 ## sample DATA. | 21 ## sample DATA. |
22 | 22 |
23 ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> | 23 ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> |
24 ## Description: CDF of the empirical distribution | 24 ## Description: CDF of the empirical distribution |
25 | 25 |
26 function cdf = empirical_cdf (X, DATA) | 26 function cdf = empirical_cdf (X, DATA) |
27 | 27 |
28 if (! is_vector (DATA)) | 28 if (! is_vector (DATA)) |
29 error ("empirical_cdf: DATA must be a vector"); | 29 error ("empirical_cdf: DATA must be a vector"); |
30 endif | 30 endif |
31 | 31 |
32 cdf = discrete_cdf (X, DATA, ones (size (DATA)) / length (DATA)); | 32 cdf = discrete_cdf (X, DATA, ones (size (DATA)) / length (DATA)); |