Home > freetb4matlab > sparse > sprandsym.m

sprandsym

PURPOSE ^

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

SYNOPSIS ^

function S = sprandsym (n, d)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} sprandsym (@var{n}, @var{d})
% @deftypefnx {Function File} {} sprandsym (@var{s})
% Generate a symmetric random sparse matrix.  The size of the matrix will be
% @var{n} 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 in its lower
% triangular part.
% @seealso{sprand, sprandn}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003