comparison scripts/strings/str2mat.m @ 2325:b5568c31ee2c

[project @ 1996-07-15 22:20:21 by jwe]
author jwe
date Mon, 15 Jul 1996 22:20:21 +0000
parents 949ab8eba8bc
children c9f70d39255f
comparison
equal deleted inserted replaced
2324:fdc6e2f81333 2325:b5568c31ee2c
1 ## Copyright (C) 1996 Kurt Hornik 1 ## Copyright (C) 1996 Kurt Hornik
2 ## 2 ##
3 ## This file is part of Octave. 3 ## This file is part of Octave.
4 ## 4 ##
5 ## Octave is free software; you can redistribute it and/or modify it 5 ## Octave is free software; you can redistribute it and/or modify it
6 ## under the terms of the GNU General Public License as published by 6 ## under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option) 7 ## the Free Software Foundation; either version 2, or (at your option)
23 ## Each string is padded with blanks in order to form a valid matrix. 23 ## Each string is padded with blanks in order to form a valid matrix.
24 24
25 ## Author: jwe 25 ## Author: jwe
26 26
27 function m = str2mat (...) 27 function m = str2mat (...)
28 28
29 ## Original version by Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>. 29 ## Original version by Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>.
30 30
31 if (nargin == 0) 31 if (nargin == 0)
32 usage ("str2mat (s1, ...)"); 32 usage ("str2mat (s1, ...)");
33 endif 33 endif
58 tmp = columns (s); 58 tmp = columns (s);
59 if (tmp > 0) 59 if (tmp > 0)
60 m (k, 1:tmp) = s; 60 m (k, 1:tmp) = s;
61 endif 61 endif
62 endfor 62 endfor
63 63
64 endfunction 64 endfunction