Mercurial > hg > octave-lyh
comparison scripts/statistics/base/ppplot.m @ 3426:f8dde1807dee
[project @ 2000-01-13 08:40:00 by jwe]
author | jwe |
---|---|
date | Thu, 13 Jan 2000 08:40:53 +0000 |
parents | 781c930425fd |
children | 71d2e09c15a2 |
comparison
equal
deleted
inserted
replaced
3425:8625164a0a39 | 3426:f8dde1807dee |
---|---|
1 ## Copyright (C) 1995, 1996, 1997 Kurt Hornik | 1 ## Copyright (C) 1995, 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: [p, y] = ppplot (x [, dist [, params]]) | 17 ## usage: [p, y] = ppplot (x [, dist [, params]]) |
33 | 33 |
34 ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> | 34 ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> |
35 ## Description: Perform a PP-plot (probability plot) | 35 ## Description: Perform a PP-plot (probability plot) |
36 | 36 |
37 function [p, y] = ppplot (x, dist, ...) | 37 function [p, y] = ppplot (x, dist, ...) |
38 | 38 |
39 if (nargin < 1) | 39 if (nargin < 1) |
40 usage ("ppplot (x [, dist [, params]])"); | 40 usage ("ppplot (x [, dist [, params]])"); |
41 endif | 41 endif |
42 | 42 |
43 if !is_vector (x) | 43 if !is_vector (x) |
44 error ("ppplot: x must be a vector."); | 44 error ("ppplot: x must be a vector."); |
45 endif | 45 endif |
46 | 46 |
47 s = sort (x); | 47 s = sort (x); |
55 if (nargin <= 2) | 55 if (nargin <= 2) |
56 y = feval (F, s); | 56 y = feval (F, s); |
57 else | 57 else |
58 y = feval (F, s, all_va_args); | 58 y = feval (F, s, all_va_args); |
59 endif | 59 endif |
60 | 60 |
61 if (nargout == 0) | 61 if (nargout == 0) |
62 axis ([0, 1, 0, 1]); | 62 axis ([0, 1, 0, 1]); |
63 set nokey; | 63 set nokey; |
64 plot (p, y); | 64 plot (p, y); |
65 endif | 65 endif |