solve.pentadiag: Pentadiagonal Linear Solver.

Description Usage Arguments Details Value Author(s) Examples

View source: R/SolvePenta.r

Description

A function to solve pentadiagonal system of linear equations.

Usage

1
2
## S3 method for class 'pentadiag'
solve(a, b, ...)

Arguments

a

a numeric square matrix with pentadiagonal rows. The function does NOT check for pentadiagonal matrix.

b

a numeric vector of the same length as nrows(a). This argument cannot be a matrix.

...

any additional arguments

Details

This function is written mainly for use in this package. It may not be the most efficient code.

Value

A vector containing the solution.

Author(s)

Arun Kumar Kuchibhotla, arunku@wharton.upenn.edu

Examples

1
2
3
4
5
6
7
A <- matrix(c(2,1,1,0,0,
			  1,2,1,1,0,
			  1,1,2,1,1,
			  0,1,1,2,1,
			  0,0,1,1,2),nrow = 5)
b <- rnorm(5)
tmp <- solve.pentadiag(A, b)

Example output

Loading required package: nnls
Loading required package: cobs

simest documentation built on May 2, 2019, 5:40 a.m.