comparison scripts/plot/hist.m @ 6582:cb3f6d51b7b3

[project @ 2007-04-25 23:06:28 by dbateman]
author dbateman
date Wed, 25 Apr 2007 23:06:28 +0000
parents 34f96dd5441b
children e4ea529efab0
comparison
equal deleted inserted replaced
6581:1a414f670635 6582:cb3f6d51b7b3
116 if (nargin == 3) 116 if (nargin == 3)
117 ## Normalise the histogram. 117 ## Normalise the histogram.
118 freq = freq / rows (y) * norm; 118 freq = freq / rows (y) * norm;
119 endif 119 endif
120 120
121 if (nargout > 0) 121 if (nargout > 1)
122 if (arg_is_vector) 122 if (arg_is_vector)
123 nn = freq'; 123 nn = freq';
124 xx = x'; 124 xx = x';
125 else 125 else
126 nn = freq; 126 nn = freq;
127 xx = x; 127 xx = x;
128 endif 128 endif
129 elseif (nargout == 1)
130 nn = bar (x, freq, 1.0);
129 else 131 else
130 bar (x, freq); 132 bar (x, freq, 1.0);
131 endif 133 endif
132 134
133 endfunction 135 endfunction
134 136
135 %!test 137 %!test