Learn R Programming

demodelr (version 2.0.1)

eigenvalues: Matrix eigenvalues and eigenvectors

Description

eigenvalues visualizes the vector field for a one or two dimensional differential equation.

Usage

eigenvalues(matrix_entries, matrix_rows = 2)

Value

The result is a list with two elements (denoted by the “$”), values and vectors. result$values are the eigenvalues, stored as a vector. The leading eigenvalue is the first entry in the vector.

Arguments

matrix_entries

entries of your matrix in row wise format. So the matrix # 4 3 # 2 1 # would be entered in c(4,3,2,1)

matrix_rows

the number of rows and columns in your SQUARE matrix.

Examples

Run this code
eigenvalues(c(1,2,3,4))

# Note: for the 3 x 3 case, we need to define the number of matrix rows:
eigenvalues(c(1,2,3,4,5,6,7,8,9),matrix_rows=3)

Run the code above in your browser using DataLab