Home > freetb4matlab > sparse > speye.m

speye

PURPOSE ^

% Returns a sparse identity matrix. This is significantly more

SYNOPSIS ^

function s = speye (m, n)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {@var{y} =} speye (@var{m})
% @deftypefnx {Function File} {@var{y} =} speye (@var{m}, @var{n})
% @deftypefnx {Function File} {@var{y} =} speye (@var{sz})
% Returns a sparse identity matrix.  This is significantly more
% efficient than @code{sparse (eye (@var{m}))} as the full matrix
% is not constructed.
%
% Called with a single argument a square matrix of size @var{m} by
% @var{m} is created.  Otherwise a matrix of @var{m} by @var{n} is
% created.  If called with a single vector argument, this argument 
% is taken to be the size of the matrix to create.
% @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