ortho.randproj: Orthogonal random matrix generator

View source: R/ortho_randproj.R

ortho.randprojR Documentation

Orthogonal random matrix generator

Description

Generate random matrices of given dimension which have full row and are orthogonal

Usage

ortho.randproj(nrow, ncol, method = "norm", seed = NULL)

Arguments

nrow

Number of rows in the random matrix to be generated

ncol

Number of colums

method

The method to be used for generating elements in the matrix. If method = "norm" (Default), elements are generated from standard normal distribution. If method = "achlioptas", the elements are selected from the set \{-1, 0, 1\} with probabilities \{1/6, 2/3, 1/6\} respectively.

seed

Set the seed to replicate the random matrix generated. Default is NULL and no seed is used.

Value

An orthogonal matrix of with nrow rows and ncol columns.

Examples

a = ortho.randproj(nrow = 5, ncol = 3)

dnayyala/cramp documentation built on June 27, 2023, 1:34 p.m.