sparse

PURPOSE ^

SPARSE Create sparse matrix (EIDORS overload).

SYNOPSIS ^

function S = sparse(varargin)

DESCRIPTION ^

SPARSE Create sparse matrix (EIDORS overload).
   S = SPARSE(X) converts a sparse or full matrix to sparse form by
   squeezing out any zero elements.

  See also SPARFUN/SPARSE

 Sparse doesn't work for uint* inputs, so we need to preconvert to double

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function S = sparse(varargin)
0002 %SPARSE Create sparse matrix (EIDORS overload).
0003 %   S = SPARSE(X) converts a sparse or full matrix to sparse form by
0004 %   squeezing out any zero elements.
0005 %
0006 %  See also SPARFUN/SPARSE
0007 %
0008 % Sparse doesn't work for uint* inputs, so we need to preconvert to double
0009 
0010 % (C) 2011 Bartlomiej Grychtol. License: GPL v2 or v3.
0011 % $Id: sparse.m 6413 2022-11-26 20:29:19Z bgrychtol $
0012 
0013 for i= 1:nargin
0014   if ~isa(varargin{i},'double')
0015      varargin{i} = double(varargin{i});
0016   end
0017 end
0018 S = builtin('sparse',varargin{:});

Generated on Fri 30-Dec-2022 19:44:54 by m2html © 2005