[37] | 1 | % BINSUM Binned sum |
---|
| 2 | % H=BINSUM(H,X,B) adds the elements of X to the elements of H |
---|
| 3 | % indicated by B. X and B are arrays of the same dimensions, and the |
---|
| 4 | % elements of B must be valid indexes for the array H. |
---|
| 5 | % |
---|
| 6 | % H=BINSUM(H,X,B,DIM) operates only on the specified dimension |
---|
| 7 | % DIM. In this case, H, X and B are array of the same dimensions, |
---|
| 8 | % except for the dimension DIM of H which may differ. The indexes B |
---|
| 9 | % are subscript for the dimension DIM of H. |
---|
| 10 | % |
---|
| 11 | % This function is very useful to compute histograms. |
---|
| 12 | % |
---|
| 13 | % Examples: BINSUM([0 0], 1, 2) = [0 1] ; |
---|
| 14 | % BINSUM([1 7], -1, 1) = [0 7] ; |
---|
| 15 | % BINSUM([0 0; 0 0], [1 1], [1 2], 1) = [1 0; 0 1] ; |
---|
| 16 | |
---|
| 17 | % AUTORIGHTS |
---|
| 18 | % Copyright (C) 2006 Andrea Vedaldi |
---|
| 19 | % |
---|
| 20 | % This file is part of VLUtil. |
---|
| 21 | % |
---|
| 22 | % VLUtil is free software; you can redistribute it and/or modify |
---|
| 23 | % it under the terms of the GNU General Public License as published by |
---|
| 24 | % the Free Software Foundation; either version 2, or (at your option) |
---|
| 25 | % any later version. |
---|
| 26 | % |
---|
| 27 | % This program is distributed in the hope that it will be useful, |
---|
| 28 | % but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 29 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 30 | % GNU General Public License for more details. |
---|
| 31 | % |
---|
| 32 | % You should have received a copy of the GNU General Public License |
---|
| 33 | % along with this program; if not, write to the Free Software Foundation, |
---|
| 34 | % Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|