expmv

Product of a matrix exponential and a vector.

Category: Mathematics > Linear Algebra

Syntax

y = expmv(A, b)

Returns expm(A)*b.

y = expmv(A, b, t)

Returns expm(t*A)*b.

Description

expmv gives the state at time t of the linear system x' = A*x that starts at b, without asking the caller to build the matrix exponential first.

MatLivre evaluates it as expm(t*A)*b. In large sparse problems, dedicated algorithms avoid forming the full exponential; the numerical result is the same.

Input arguments

A
Square matrix.
b
Vector or matrix with size(A,1) rows.
t
Optional scalar multiplying A.

Output arguments

y
The product expm(t*A)*b.

Example

Flow of a shear system

A = [0 1; 0 0];
b = [1; 1];
expmv(A, b)
expmv(A, b, 2)
Output
ans = 2×1

     2
     1
ans = 2×1

     3
     1

Notes

expmv is not part of core MATLAB. MatLivre uses the argument order (A, b, t), with t optional and defaulting to 1.

See also

expm logm funm ode45