Mercurial > hg > octave-avbm
comparison src/data.cc @ 5642:2618a0750ae6
[project @ 2006-03-06 21:26:48 by jwe]
author | jwe |
---|---|
date | Mon, 06 Mar 2006 21:26:54 +0000 |
parents | 4b33d802ef3c |
children | a8f6903535c9 |
comparison
equal
deleted
inserted
replaced
5641:eb998631a4aa | 5642:2618a0750ae6 |
---|---|
776 DEFUN (horzcat, args, , | 776 DEFUN (horzcat, args, , |
777 "-*- texinfo -*-\n\ | 777 "-*- texinfo -*-\n\ |
778 @deftypefn {Built-in Function} {} horzcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN})\n\ | 778 @deftypefn {Built-in Function} {} horzcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN})\n\ |
779 Return the horizontal concatenation of N-d array objects, @var{array1},\n\ | 779 Return the horizontal concatenation of N-d array objects, @var{array1},\n\ |
780 @var{array2}, @dots{}, @var{arrayN} along dimension 2.\n\ | 780 @var{array2}, @dots{}, @var{arrayN} along dimension 2.\n\ |
781 @end deftypefn\n\ | 781 @seealso{cat, vertcat}\n\ |
782 @seealso{cat and vertcat}") | 782 @end deftypefn") |
783 { | 783 { |
784 octave_value_list args_tmp = args; | 784 octave_value_list args_tmp = args; |
785 | 785 |
786 int dim = 2; | 786 int dim = 2; |
787 | 787 |
795 DEFUN (vertcat, args, , | 795 DEFUN (vertcat, args, , |
796 "-*- texinfo -*-\n\ | 796 "-*- texinfo -*-\n\ |
797 @deftypefn {Built-in Function} {} vertcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN})\n\ | 797 @deftypefn {Built-in Function} {} vertcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN})\n\ |
798 Return the vertical concatenation of N-d array objects, @var{array1},\n\ | 798 Return the vertical concatenation of N-d array objects, @var{array1},\n\ |
799 @var{array2}, @dots{}, @var{arrayN} along dimension 1.\n\ | 799 @var{array2}, @dots{}, @var{arrayN} along dimension 1.\n\ |
800 @end deftypefn\n\ | 800 @seealso{cat, horzcat}\n\ |
801 @seealso{cat and horzcat}") | 801 @end deftypefn") |
802 { | 802 { |
803 octave_value_list args_tmp = args; | 803 octave_value_list args_tmp = args; |
804 | 804 |
805 int dim = 1; | 805 int dim = 1; |
806 | 806 |
854 ans(:,:,1,2) =\n\ | 854 ans(:,:,1,2) =\n\ |
855 0 0\n\ | 855 0 0\n\ |
856 0 0\n\ | 856 0 0\n\ |
857 @end group\n\ | 857 @end group\n\ |
858 @end example\n\ | 858 @end example\n\ |
859 \n\ | 859 @seealso{horzcat, vertcat}\n\ |
860 @end deftypefn\n\ | 860 @end deftypefn") |
861 @seealso{horzcat and vertcat}") | |
862 { | 861 { |
863 return do_cat (args, "cat"); | 862 return do_cat (args, "cat"); |
864 } | 863 } |
865 | 864 |
866 static octave_value | 865 static octave_value |
895 "-*- texinfo -*-\n\ | 894 "-*- texinfo -*-\n\ |
896 @deftypefn {Built-in Function} {} permute (@var{a}, @var{perm})\n\ | 895 @deftypefn {Built-in Function} {} permute (@var{a}, @var{perm})\n\ |
897 Return the generalized transpose for an N-d array object @var{a}.\n\ | 896 Return the generalized transpose for an N-d array object @var{a}.\n\ |
898 The permutation vector @var{perm} must contain the elements\n\ | 897 The permutation vector @var{perm} must contain the elements\n\ |
899 @code{1:ndims(a)} (in any order, but each element must appear just once).\n\ | 898 @code{1:ndims(a)} (in any order, but each element must appear just once).\n\ |
900 \n\ | 899 @seealso{ipermute}\n\ |
901 @end deftypefn\n\ | 900 @end deftypefn") |
902 @seealso{ipermute}") | |
903 { | 901 { |
904 return do_permute (args, false, "permute"); | 902 return do_permute (args, false, "permute"); |
905 } | 903 } |
906 | 904 |
907 DEFUN (ipermute, args, , | 905 DEFUN (ipermute, args, , |
911 \n\ | 909 \n\ |
912 @example\n\ | 910 @example\n\ |
913 ipermute (permute (a, perm), perm)\n\ | 911 ipermute (permute (a, perm), perm)\n\ |
914 @end example\n\ | 912 @end example\n\ |
915 returns the original array @var{a}.\n\ | 913 returns the original array @var{a}.\n\ |
916 \n\ | 914 @seealso{permute}\n\ |
917 @end deftypefn\n\ | 915 @end deftypefn") |
918 @seealso{permute}") | |
919 { | 916 { |
920 return do_permute (args, true, "ipermute"); | 917 return do_permute (args, true, "ipermute"); |
921 } | 918 } |
922 | 919 |
923 DEFUN (length, args, , | 920 DEFUN (length, args, , |