Mercurial > hg > octave-nkf
comparison scripts/plot/hist.m @ 2311:2b5788792cad
[project @ 1996-07-11 20:18:38 by jwe]
author | jwe |
---|---|
date | Thu, 11 Jul 1996 20:18:38 +0000 |
parents | 5cffc4b8de57 |
children | 5ca126254d15 |
comparison
equal
deleted
inserted
replaced
2310:e2a8f216373d | 2311:2b5788792cad |
---|---|
15 ### You should have received a copy of the GNU General Public License | 15 ### You should have received a copy of the GNU General Public License |
16 ### along with Octave; see the file COPYING. If not, write to the Free | 16 ### along with Octave; see the file COPYING. If not, write to the Free |
17 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA | 17 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
18 ### 02111-1307, USA. | 18 ### 02111-1307, USA. |
19 | 19 |
20 ## usage: [NN, XX] = hist (Y, X) or hist (Y, X) | |
21 ## | |
22 ## Produce histogram counts or plots. | |
23 ## | |
24 ## With one vector input argument, plot a histogram of the values with | |
25 ## 10 bins. The range of the histogram bins is determined by the range | |
26 ## of the data. | |
27 ## | |
28 ## Given a second scalar argument, use that as the number of bins. | |
29 ## | |
30 ## Given a second vector argument, use that as the centers of the bins, | |
31 ## with the width of the bins determened from the adjacent values in | |
32 ## the vector. | |
33 ## | |
34 ## Extreme values are lumped in the first and last bins. | |
35 ## | |
36 ## With two output arguments, produce the values NN and XX such that | |
37 ## bar (XX, NN) will plot the histogram. | |
38 ## | |
39 ## See also: bar | |
40 | |
20 function [nn, xx] = hist (y, x) | 41 function [nn, xx] = hist (y, x) |
21 | |
22 ## usage: [NN, XX] = hist (Y, X) or hist (Y, X) | |
23 ## | |
24 ## Produce histogram counts or plots. | |
25 ## | |
26 ## With one vector input argument, plot a histogram of the values with | |
27 ## 10 bins. The range of the histogram bins is determined by the range | |
28 ## of the data. | |
29 ## | |
30 ## Given a second scalar argument, use that as the number of bins. | |
31 ## | |
32 ## Given a second vector argument, use that as the centers of the bins, | |
33 ## with the width of the bins determened from the adjacent values in | |
34 ## the vector. | |
35 ## | |
36 ## Extreme values are lumped in the first and last bins. | |
37 ## | |
38 ## With two output arguments, produce the values NN and XX such that | |
39 ## bar (XX, NN) will plot the histogram. | |
40 ## | |
41 ## See also: bar | |
42 | 42 |
43 if (nargin < 1 || nargin > 2) | 43 if (nargin < 1 || nargin > 2) |
44 usage ("[nn, xx] = hist (y, x)"); | 44 usage ("[nn, xx] = hist (y, x)"); |
45 endif | 45 endif |
46 | 46 |