RM_norm: Generate a normal random matrix

Description Usage Arguments Value Examples

View source: R/matrices.R

Description

Normal random matrices are matrices with normally distributed entries. These matrices are extensively studied in random matrix theory.

Usage

1
RM_norm(N, mean = 0, sd = 1, symm = FALSE, cplx = FALSE, herm = FALSE)

Arguments

N

number of dimensions of the square matrix

mean

mean of the normal distribution of entries

sd

standard deviation of the normal distribution of entries

symm

indicates whether the matrix should be symmetric (equal to its transpose). Reserved for when cplx = FALSE, otherwise use herm = TRUE.

cplx

indicates whether the matrix should have complex entries.

herm

indicates whether the matrix should be hermitian (equal to its conjugate transpose). Reserved for when cplx = TRUE, otherwise use symm = TRUE.

Value

A random matrix with normally distributed entries.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# N(1,2) distributed matrix
P <- RM_norm(N = 3, mean = 1, sd = 2)

# N(0,5) distributed matrix with real symmetric entries
P <- RM_norm(N = 7, sd = 5, symm = TRUE)

# 7x7 standard normal matrix with complex entries
Q <- RM_norm(N = 7, cplx = TRUE)

# N(2,1) distributed matrix with hermitian complex entries
Q <- RM_norm(N = 5, mean = 2, cplx = TRUE, herm = TRUE)

RMAT documentation built on April 28, 2021, 9:06 a.m.