File: example_expm.f90

package info (click to toggle)
fortran-stdlib 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,008 kB
  • sloc: f90: 24,178; ansic: 1,244; cpp: 623; python: 119; makefile: 13
file content (18 lines) | stat: -rw-r--r-- 375 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
program example_expm
   use stdlib_linalg, only: expm
   implicit none
   real :: A(3, 3), E(3, 3)
   integer :: i
   A = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3])
   E = expm(A)

   print *, "Matrix A :"
   do i = 1, 3
      print *, A(i, :)
   end do

   print *, "Matrix exponential E = exp(A):"
   do i = 1, 3
      print *, E(i, :)
   end do
end program example_expm