Mercurial > hg > octave-terminal
changeset 4538:f855e276044c
[project @ 2003-10-16 03:42:39 by jwe]
author | jwe |
---|---|
date | Thu, 16 Oct 2003 03:42:39 +0000 |
parents | 6b7d8e93fc10 |
children | 5c6f7daf1e3f |
files | scripts/miscellaneous/horzcat.m scripts/miscellaneous/vertcat.m |
diffstat | 2 files changed, 66 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/scripts/miscellaneous/horzcat.m @@ -0,0 +1,33 @@ +## Copyright (C) 2003 John W. Eaton +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, write to the Free +## Software Foundation, 59 Temple Place - Suite 330, Boston, MA +## 02111-1307, USA. + +## -*- texinfo -*- +## @deftypefn {Function File} {@var{c} =} horzcat (@var{a}, @var{b}) +## Equivalent to @code{c = [a, b]}. +## @end deftypefn + +function c = horzcat (a, b) + + if (nargin == 2) + c = [a, b]; + else + usage ("horzcat (a, b)"); + endif + +endfunction
new file mode 100644 --- /dev/null +++ b/scripts/miscellaneous/vertcat.m @@ -0,0 +1,33 @@ +## Copyright (C) 2003 John W. Eaton +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, write to the Free +## Software Foundation, 59 Temple Place - Suite 330, Boston, MA +## 02111-1307, USA. + +## -*- texinfo -*- +## @deftypefn {Function File} {@var{c} =} vertcat (@var{a}, @var{b}) +## Equivalent to @code{c = [a; b]}. +## @end deftypefn + +function c = vertcat (a, b) + + if (nargin == 2) + c = [a, b]; + else + usage ("vertcat (a, b)"); + endif + +endfunction