Main Content

distributed.speye

Create distributed sparse identity matrix

Syntax

DS = distributed.speye(n)
DS = distributed.speye(m,n)
DS = distributed.speye([m,n])
DS = distributed.speye(___,typename)

Description

DS = distributed.speye(n) creates an n-by-n sparse distributed identity matrix of underlying class double.

DS = distributed.speye(m,n) or DS = distributed.speye([m,n]) creates an m-by-n sparse distributed identity matrix of underlying class double.

DS = distributed.speye(___,typename) also specifies the data type (class) for any of the previous syntaxes. The typename input can be either "single" or "double". (since R2025a)

Examples

Create a distributed 1000-by-1000 sparse identity matrix:

 N = 1000;
 DS = distributed.speye(N);

Create a 400-by-800 sparse identity single-precision matrix.

DS = distributed.speye(400,800,"single");

Version History

Introduced in R2009b

expand all