Home > freetb4matlab > sparse > sprandn.m

sprandn

PURPOSE ^

% Generate a random sparse matrix. The size of the matrix will be

SYNOPSIS ^

function S = sprandn (m, n, d)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} sprandn (@var{m}, @var{n}, @var{d})
% @deftypefnx {Function File} {} sprandn (@var{s})
% Generate a random sparse matrix.  The size of the matrix will be
% @var{m} by @var{n}, with a density of values given by @var{d}.
% @var{d} should be between 0 and 1. Values will be normally
% distributed with mean of zero and variance 1.
%
% Note: sometimes the actual density may be a bit smaller than @var{d}. 
% This is unlikely to happen for large really sparse matrices.
%
% If called with a single matrix argument, a random sparse matrix is
% generated wherever the matrix @var{S} is non-zero.
% @seealso{sprand}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003