getfeasibleMatr: Creates a feasible starting matrix

View source: R/lib_FindFeasibleMatrix.R

getfeasibleMatrR Documentation

Creates a feasible starting matrix

Description

Creates a matrix with nonnegative entries, given row and column sums and 0 on the diagonal. Superseeded by the more flexible findFeasibleMatrix.

Usage

getfeasibleMatr(L, A)

Arguments

L

Vector of row sums

A

Vector of column sums

Value

A matrix with nonnegative entries and given row/column sums and 0 on the diagonal.

Examples

getfeasibleMatr(c(0.5,1,0),c(0.5,0,1))
getfeasibleMatr(rep(1,4),rep(1,4))
getfeasibleMatr(2^(1:3),2^(3:1))
getfeasibleMatr(1:5,1:5)
getfeasibleMatr(1:5,5:1)

systemicrisk documentation built on May 29, 2024, 9:20 a.m.