Create Random Matrix VI
- Updated2023-02-21
- 8 minute(s) read
Create Random Matrix VI
Owning Palette: Sparse Linear Algebra VIs
Requires: Multicore Analysis and Sparse Matrix Toolkit
Generates a sparse matrix randomly.
You must manually select the polymorphic instance you want to use.
Create Random Matrix (DBL)

![]() |
distribution specifies the distribution of the elements in Sparse Matrix.
|
||||||
![]() |
matrix type specifies the type of sparse matrix to create.
|
||||||
![]() |
number of rows specifies the number of rows in Sparse Matrix. The number of rows must be positive. | ||||||
![]() |
number of columns specifies the number of columns in Sparse Matrix. The number of columns must be positive. | ||||||
![]() |
density specifies the density of elements in Sparse Matrix. The number of elements in Sparse Matrix equals to density*number of rows*number of columns. The density must range from 0 to 1. The default is 0.01. | ||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||
![]() |
seed specifies how this VI generates the sparse matrix randomly. If seed is greater than 0, LabVIEW uses seed to generate the internal state directly. If seed is less than or equal to 0, LabVIEW uses a random number to generate the internal state. The default is -1. | ||||||
![]() |
Sparse Matrix returns the randomly created sparse matrix. | ||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Create Random Matrix (SGL)

![]() |
distribution specifies the distribution of the elements in Sparse Matrix.
|
||||||
![]() |
matrix type specifies the type of sparse matrix to create.
|
||||||
![]() |
number of rows specifies the number of rows in Sparse Matrix. The number of rows must be positive. | ||||||
![]() |
number of columns specifies the number of columns in Sparse Matrix. The number of columns must be positive. | ||||||
![]() |
density specifies the density of elements in Sparse Matrix. The number of elements in Sparse Matrix equals to density*number of rows*number of columns. The density must range from 0 to 1. The default is 0.01. | ||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||
![]() |
seed specifies how this VI generates the sparse matrix randomly. If seed is greater than 0, LabVIEW uses seed to generate the internal state directly. If seed is less than or equal to 0, LabVIEW uses a random number to generate the internal state. The default is -1. | ||||||
![]() |
Sparse Matrix returns the randomly created sparse matrix. | ||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Create Random Matrix (CDB)

![]() |
distribution specifies the distribution of the elements in Sparse Matrix.
|
||||||
![]() |
matrix type specifies the type of sparse matrix to create.
|
||||||
![]() |
number of rows specifies the number of rows in Sparse Matrix. The number of rows must be positive. | ||||||
![]() |
number of columns specifies the number of columns in Sparse Matrix. The number of columns must be positive. | ||||||
![]() |
density specifies the density of elements in Sparse Matrix. The number of elements in Sparse Matrix equals to density*number of rows*number of columns. The density must range from 0 to 1. The default is 0.01. | ||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||
![]() |
seed specifies how this VI generates the sparse matrix randomly. If seed is greater than 0, LabVIEW uses seed to generate the internal state directly. If seed is less than or equal to 0, LabVIEW uses a random number to generate the internal state. The default is -1. | ||||||
![]() |
Sparse Matrix returns the randomly created sparse matrix. | ||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Create Random Matrix (CSG)

![]() |
distribution specifies the distribution of the elements in Sparse Matrix.
|
||||||
![]() |
matrix type specifies the type of sparse matrix to create.
|
||||||
![]() |
number of rows specifies the number of rows in Sparse Matrix. The number of rows must be positive. | ||||||
![]() |
number of columns specifies the number of columns in Sparse Matrix. The number of columns must be positive. | ||||||
![]() |
density specifies the density of elements in Sparse Matrix. The number of elements in Sparse Matrix equals to density*number of rows*number of columns. The density must range from 0 to 1. The default is 0.01. | ||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||
![]() |
seed specifies how this VI generates the sparse matrix randomly. If seed is greater than 0, LabVIEW uses seed to generate the internal state directly. If seed is less than or equal to 0, LabVIEW uses a random number to generate the internal state. The default is -1. | ||||||
![]() |
Sparse Matrix returns the randomly created sparse matrix. | ||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Create Random Matrix Details
The following table lists the support characteristics of this VI.
| Supported on RT targets | Yes |
| Suitable for bounded execution times on RT | No |




