Learn R Programming

PowerfulMaxEigenpair (version 0.1.1)

tridiag: Tridiagonal matrix

Description

Generate tridiagonal matrix Q based on three input vectors.

Usage

tridiag(upper, lower, main)

Arguments

upper

The upper diagonal vector.

lower

The lower diagonal vector.

main

The main diagonal vector.

Value

A tridiagonal matrix is returned.

Examples

Run this code
# NOT RUN {
a = c(1:7)^2
b = c(1:7)^2
c = -c(1:8)^2
tridiag(b, a, c)
# }

Run the code above in your browser using DataLab