Skip to content

Commit 0c30db1

Browse files
committed
example
1 parent 89da8ab commit 0c30db1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

example/linalg/example_hermitian.f90

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
! Example program demonstrating the usage of hermitian
2+
program example_hermitian
3+
use stdlib_linalg, only: hermitian
4+
implicit none
5+
6+
complex, dimension(2, 2) :: A, AT
7+
8+
! Define input matrices
9+
A = reshape([(1,2),(3,4),(5,6),(7,8)],[2,2])
10+
11+
! Compute Hermitian matrices
12+
AT = hermitian(A)
13+
14+
print *, "Original Complex Matrix:"
15+
print *, A
16+
print *, "Hermitian Complex Matrix:"
17+
print *, AT
18+
19+
end program example_hermitian

0 commit comments

Comments
 (0)