1 function [H,X]=histo(Y,Mode)
2 % HISTO calculates histogram for each column
3 % [H,X] = HISTO(Y,Mode)
6 % 'rows' : frequency of each row
7 % '1x' : single bin-values
8 % 'nx' : separate bin-values for each column
10 % H is the frequency of occurence of value X
12 % HISTO(Y) with no output arguments:
13 % plots the histogram bar(X,H)
15 % more histogram-based results can be obtained by HIST2RES2
17 % see also: HISTO, HISTO2, HISTO3, HISTO4
20 % C.E. Shannon and W. Weaver "The mathematical theory of communication" University of Illinois Press, Urbana 1949 (reprint 1963).
22 % $Id: histo.m 5148 2008-06-27 10:36:37Z schloegl $
23 % Copyright (C) 1996-2002,2008 by Alois Schloegl <a.schloegl@ieee.org>
24 % This is part of the TSA-toolbox
25 % http://hci.tugraz.at/~schloegl/matlab/tsa/
27 % This program is free software: you can redistribute it and/or modify
28 % it under the terms of the GNU General Public License as published by
29 % the Free Software Foundation, either version 3 of the License, or
30 % (at your option) any later version.
32 % This program is distributed in the hope that it will be useful,
33 % but WITHOUT ANY WARRANTY; without even the implied warranty of
34 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 % GNU General Public License for more details.
37 % You should have received a copy of the GNU General Public License
38 % along with this program. If not, see <http://www.gnu.org/licenses/>.
45 if strcmp(Mode,'rows')
48 elseif strcmp(Mode,'column')
52 elseif strcmp(Mode,'1x')
55 elseif strcmp(Mode,'nx')
64 if exist('OCTAVE_VERSION')<5,
65 bar(R.X,R.H,'stacked');
70 warning('2-dim X-values not supported\n')