Skip to content

Commit 8a94078

Browse files
committed
Add example for expm
1 parent fb52445 commit 8a94078

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

example/linalg/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ ADD_EXAMPLE(qr)
5757
ADD_EXAMPLE(qr_space)
5858
ADD_EXAMPLE(cholesky)
5959
ADD_EXAMPLE(chol)
60+
ADD_EXAMPLE(expm)

example/linalg/example_expm.f90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
program example_expm
2+
use stdlib_linalg, only: expm
3+
implicit none
4+
real :: A(3, 3), E(3, 3)
5+
A = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3])
6+
E = expm(A)
7+
end program example_expm

0 commit comments

Comments
 (0)