File: example_hermitian.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 (19 lines) | stat: -rw-r--r-- 435 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! Example program demonstrating the usage of hermitian
program example_hermitian
  use stdlib_linalg, only: hermitian
  implicit none

  complex, dimension(2, 2) :: A, AT

  ! Define input matrices
  A = reshape([(1,2),(3,4),(5,6),(7,8)],[2,2])

  ! Compute Hermitian matrices
  AT = hermitian(A)

  print *, "Original Complex Matrix:"
  print *, A
  print *, "Hermitian Complex Matrix:"
  print *, AT
  
end program example_hermitian