Mercurial > hg > octave-nkf
comparison scripts/plot/hist.m @ 7208:a730e47fda4d
[project @ 2007-11-28 02:32:41 by jwe]
author | jwe |
---|---|
date | Wed, 28 Nov 2007 02:32:42 +0000 |
parents | b48a21816f2e |
children | b3acdf1c41a5 |
comparison
equal
deleted
inserted
replaced
7207:71c03c7239fb | 7208:a730e47fda4d |
---|---|
67 n = 10; | 67 n = 10; |
68 x = [0.5:n]'/n; | 68 x = [0.5:n]'/n; |
69 x = x * (max_val - min_val) + ones(size(x)) * min_val; | 69 x = x * (max_val - min_val) + ones(size(x)) * min_val; |
70 else | 70 else |
71 ## nargin is either 2 or 3 | 71 ## nargin is either 2 or 3 |
72 x = varargin {iarg++}; | 72 x = varargin{iarg++}; |
73 if (isscalar (x)) | 73 if (isscalar (x)) |
74 n = x; | 74 n = x; |
75 if (n <= 0) | 75 if (n <= 0) |
76 error ("hist: number of bins must be positive"); | 76 error ("hist: number of bins must be positive"); |
77 endif | 77 endif |