Learn R Programming

PowerfulMaxEigenpair (version 0.1.1)

powerful.maxeig.tri: Tridiagonal matrix maximal eigenpair

Description

Calculate the maximal eigenpair for the tridiagonal matrix by Thomas algorithm.

Usage

powerful.maxeig.tri(a, b, C, digit.thresh = 6)

Arguments

a

The lower diagonal vector.

b

The upper diagonal vector.

C

The main diagonal vector.

digit.thresh

The precise level of output results.

Value

A list of eigenpair object are returned, with components \(z\), \(v\) and \(iter\).

z

The approximating sequence of the maximal eigenvalue.

v

The approximating eigenfunction of the corresponding eigenvector.

iter

The number of iterations.

Examples

Run this code
# NOT RUN {
nn = 8
a = c(1:(nn - 1))^2
b = c(1:(nn - 1))^2
C = c(b[1], a[1:(nn - 2)] + b[2:(nn - 1)], a[nn - 1] + nn^2)
powerful.maxeig.tri(a, b, C, digit.thresh = 6)
# }

Run the code above in your browser using DataLab