comparison scripts/sparse/sprand.m @ 7016:93c65f2a5668

[project @ 2007-10-12 06:40:56 by jwe]
author jwe
date Fri, 12 Oct 2007 06:41:26 +0000
parents 2c85044aa63f
children a1dbe9d80eee
comparison
equal deleted inserted replaced
7015:0a708692d51d 7016:93c65f2a5668
1 ## Copyright (C) 2004 Paul Kienzle 1 ## Copyright (C) 2004 Paul Kienzle
2 ## 2 ##
3 ## This program is free software and is in the public domain 3 ## This file is part of Octave.
4 ##
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
7 ## the Free Software Foundation; either version 3 of the License, or (at
8 ## your option) any later version.
9 ##
10 ## Octave is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING. If not, see
17 ## <http://www.gnu.org/licenses/>.
18 ##
19 ## Original version by Paul Kienzle distributed as free software in the
20 ## public domain.
4 21
5 ## -*- texinfo -*- 22 ## -*- texinfo -*-
6 ## @deftypefn {Function File} {} sprand (@var{m}, @var{n}, @var{d}) 23 ## @deftypefn {Function File} {} sprand (@var{m}, @var{n}, @var{d})
7 ## @deftypefnx {Function File} {} sprand (@var{s}) 24 ## @deftypefnx {Function File} {} sprand (@var{s})
8 ## Generate a random sparse matrix. The size of the matrix will be 25 ## Generate a random sparse matrix. The size of the matrix will be
16 ## If called with a single matrix argument, a random sparse matrix is 33 ## If called with a single matrix argument, a random sparse matrix is
17 ## generated wherever the matrix @var{S} is non-zero. 34 ## generated wherever the matrix @var{S} is non-zero.
18 ## @seealso{sprandn} 35 ## @seealso{sprandn}
19 ## @end deftypefn 36 ## @end deftypefn
20 37
21 ## This program is public domain
22 ## Author: Paul Kienzle <pkienzle@users.sf.net> 38 ## Author: Paul Kienzle <pkienzle@users.sf.net>
23 ## 39 ##
24 ## Changelog: 40 ## Changelog:
25 ## 41 ##
26 ## Piotr Krzyzanowski <przykry2004@users.sf.net> 42 ## Piotr Krzyzanowski <przykry2004@users.sf.net>