upper: Create an upper triangular matrix

Description Usage Arguments Value See Also Examples

View source: R/helpers.r

Description

Create an upper triangular matrix.

Usage

1
upper(x)

Arguments

x

a vector

Value

...

See Also

lower

Examples

1
2
3
4
5
6
7
upper(1:3)
lower(1:3)

upper(1:6)
lower(1:6)

upper(rnorm(6))

Example output

Loading required package: mpoly
Loading required package: stringr
Set Macaulay2 path with setM2Path().
Set Bertini path with setBertiniPath().
Set LattE-integrale path with setLattePath().
Set 4ti2 path with setMarkovPath().
     [,1] [,2] [,3]
[1,]    0    1    2
[2,]    0    0    3
[3,]    0    0    0
     [,1] [,2] [,3]
[1,]    0    0    0
[2,]    1    0    0
[3,]    2    3    0
     [,1] [,2] [,3] [,4]
[1,]    0    1    2    3
[2,]    0    0    4    5
[3,]    0    0    0    6
[4,]    0    0    0    0
     [,1] [,2] [,3] [,4]
[1,]    0    0    0    0
[2,]    1    0    0    0
[3,]    2    4    0    0
[4,]    3    5    6    0
     [,1]     [,2]        [,3]       [,4]
[1,]    0 -0.60899 -0.46578946 -0.2328101
[2,]    0  0.00000 -0.01000687  1.2045196
[3,]    0  0.00000  0.00000000  1.2003013
[4,]    0  0.00000  0.00000000  0.0000000

algstat documentation built on May 29, 2017, 10:34 p.m.

Related to upper in algstat...