Mercurial > octave-nkf
comparison scripts/general/accumdim.m @ 10397:180931276a52
fix example in accumdim
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 05 Mar 2010 12:40:06 +0100 |
parents | a0b51ac0f88a |
children | b32a0214a464 |
comparison
equal
deleted
inserted
replaced
10396:a0b51ac0f88a | 10397:180931276a52 |
---|---|
38 ## | 38 ## |
39 ## The slices of the returned array that have no subscripts associated with | 39 ## The slices of the returned array that have no subscripts associated with |
40 ## them are set to zero. Defining @var{fillval} to some other value allows | 40 ## them are set to zero. Defining @var{fillval} to some other value allows |
41 ## these values to be defined. | 41 ## these values to be defined. |
42 ## | 42 ## |
43 ## An example of the use of @code{accumarray} is: | 43 ## An example of the use of @code{accumdim} is: |
44 ## | 44 ## |
45 ## @example | 45 ## @example |
46 ## @group | 46 ## @group |
47 ## accumarray ([1,1,1;2,1,2;2,3,2;2,1,2;2,3,2], 101:105) | 47 ## accumdim ([1, 2, 1, 2, 1], [7,-10,4;-5,-12,8;-12,2,8;-10,9,-3;-5,-3,-13]) |
48 ## @result{} ans(:,:,1) = [101, 0, 0; 0, 0, 0] | 48 ## @result{} ans = [-10,-11,-1;-15,-3,5] |
49 ## ans(:,:,2) = [0, 0, 0; 206, 0, 208] | |
50 ## @end group | 49 ## @end group |
51 ## @end example | 50 ## @end example |
52 ## | 51 ## |
53 ## @seealso{accumarray} | 52 ## @seealso{accumarray} |
54 ## @end deftypefn | 53 ## @end deftypefn |