Learn R Programming

plsdof (version 0.3-2)

krylov: Krylov sequence

Description

This function computes the Krylov sequence of a matrix and a vector.

Usage

krylov(A, b, m)

Value

A matrix of size p x m containing the sequence b,Ab,..., A^(m-1)b.

Arguments

A

square matrix of dimension p x p.

b

vector of length p

m

length of the Krylov sequence

Author

Nicole Kraemer

Examples

Run this code

A<-matrix(rnorm(8*8),ncol=8)
b<-rnorm(8)
K<-krylov(A,b,4)

Run the code above in your browser using DataLab